maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Personal IP Address for Fremantle (https://talk.maemo.org/showthread.php?t=32394)

access 2009-10-06 11:31

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by fiferboy (Post 340093)
Tim - I was following the layout of larger widgets, which has the icon offset at the top. When I shrunk it to a single line, I didn't think about reformatting it. Your way makes sense to me.

I just have to see if it is going to stay a one line applet (I am leaning toward not adding any more information - maybe just the interface name). If so, I will try out your formatting.

Thanks

Would it be possible to change the displayed IP when clicking on the widget. That way you stay on one line but have the ability to view other interfaces also, i.e. cycle through eth0 (private) eth1 (public), sit0 etc.

allnameswereout 2009-10-06 17:09

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by zerojay (Post 338644)
You can't have an internet connection open to both at the same time anyways.

You can, but usually either one of them has your default route.

To get your external IP (as others see it) you can try to parse the output of http://www.whatismyip.org this output is plaintext, IPv4 only. Not sure how it handles proxies e.g. X_FORWARDED_FOR header.

zerojay 2009-10-06 17:34

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by allnameswereout (Post 340498)
You can, but usually either one of them has your default route.

To get your external IP (as others see it) you can try to parse the output of http://www.whatismyip.org this output is plaintext, IPv4 only. Not sure how it handles proxies e.g. X_FORWARDED_FOR header.

I'm talking about regular user usage. Your internet is going to be sent through GPRS or Wifi... not both at once.

lma 2009-10-06 20:22

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by allnameswereout (Post 340498)
To get your external IP (as others see it) you can try to parse the output of http://www.whatismyip.org this output is plaintext, IPv4 only.

http://ip.help.me.uk/ does both v4 & v6, but requires a bit more "parsing". Alternatively you can use STUN with libnice.

allnameswereout 2009-10-06 21:23

Re: Personal IP Address for Fremantle
 
Hmm, well, in Symbian you can use multiple network connections at once. You can have any application use a defined network connection (or get it to wizard to define another one), or tell it to use a specific network connection. Which is sometimes rather useful.

For example, you can have one application using VPN, and the rest not. Or have one running on GPRS, rest on WiFi. For example, you'd want your IM on GPRS, but your browser over WiFi. When you go away your browser has to connect using GPRS whereas your IM client stays connected over GPRS because it was connected via GPRS in the first place. You can also use your mail application over GPRS whole time, using always SMTP server over GPRS, hence not needing to define more than one SMTP server. Plus, having more than 1 network connection enabled allows automatic failover because the next default route gets used.

Does anyone know how Symbian does this? I imagine such is rather simple to implement on a microkernel whereas it is rather difficult to get such working on Linux if the application only allows to bind to any interface instead of one specified. It is rather tricky to do routing based on layer-7 information although there is a layer-7 project for Linux. You'll see demand for this sooner or later. We'll see demand for layer-7 QoS and accounting. We'll see people WTFing over data usage, wanting to give SIP priority, or people who will not want their BitTorrent client to be used over GPRS, but are OK with it being used on their home WiFi.

(Once I have the device this is one of my interests, btw.)

Quote:

Originally Posted by lma (Post 340635)
http://ip.help.me.uk/ does both v4 & v6, but requires a bit more "parsing".

It also shows DNS and useragent. Most lightweight I've seen which includes all 3; thanks!

lma 2009-10-06 22:34

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by allnameswereout (Post 340674)
it is rather difficult to get such working on Linux if the application only allows to bind to any interface instead of one specified.

Policy routing is one way to do it transparently to the applications, but we'd need to have multi-homing first obviously.

allnameswereout 2009-10-07 01:12

Re: Personal IP Address for Fremantle
 
Quote:

Originally Posted by lma (Post 340715)
Policy routing is one way to do it transparently to the applications, but we'd need to have multi-homing first obviously.

Ah yes, that is neat, then with iproute2 you also get QoS. I saw here an example involving -m owner. This allows different owners to get different priority, but only works on local OS, and its still not as flexible as using layer 7. I also notice iptables supports quota, that is also neat.

[EDIT]Example howto policy routing[/EDIT]

fiferboy 2009-10-16 02:01

Re: Personal IP Address for Fremantle
 
1 Attachment(s)
Version 0.3-1 is available. Changed layout. Display the interface you are connected to. When you click the widget it attempts to connect or restore connection.

I'm open for suggestions about clicking the widget. If it is annoying to try establish a connection on click it could be optional.

frals 2009-10-16 08:03

Re: Personal IP Address for Fremantle
 
Would much appreciate if the "click to connect" was a setting. :)

fiferboy 2009-10-16 10:31

Re: Personal IP Address for Fremantle
 
Here is a bit more information about "click to connect" (which will soon be a setting).

It attempts to connect in the same way as any other application that requires internet - with the connections you have defined. As I don't actually have a dataplan I'm not sure what this means with cell connections, but it is the same as any other application that will try to connect when you start it.


All times are GMT. The time now is 21:53.

vBulletin® Version 3.8.8