12-28-2012, 11:10 PM | #1 |
Member
Posts: 13
Karma: 13156
Join Date: Feb 2011
Device: Kindle Paperwhite
|
Browser and localhost
So since someone now has Python on the Kindle, I had a shot at getting some of my Python ebook utils to work natively. It appears that they quite nicely do. However, since I haven't found a decent terminal emulator that works on Paperwhite and the options for user interface on the device itself are otherwise quite limited, I thought to fiddle an HTTPD and run through the browser on the device in order to be able to run things via CGI. HTTPD runs fine, and using elinks over SSH works perfectly. However, it appears that the Paperwhite experimental browser won't connect to localhost--it gives me the "unsupported file type for download" dialog. (I connected to the same HTTPD setup on another machine in my local network and it worked fine, so I know it's not a problem on that end.) Does anyone know how to get around this, or in general much about the Paperwhite browser? Google is not being particularly helpful.
|
12-29-2012, 12:42 AM | #2 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Try 0.0.0.0 instead of localhost
|
Advert | |
|
12-29-2012, 02:26 AM | #3 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
The "any address, any interface" setting?
Why not just use the primary address of one of the machine's interfaces? The kernel stack will recognize that as "local" and send it over the "localhost" path even though it isn't 127.0.0.1 |
12-29-2012, 02:35 AM | #4 |
Member
Posts: 13
Karma: 13156
Join Date: Feb 2011
Device: Kindle Paperwhite
|
Okay, it appears that 0.0.0.0 works. Addresses of interfaces don't; it doesn't give me the popup, just hangs and refuses to load. Thanks for the help.
|
12-29-2012, 02:39 AM | #5 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Then list the open sockets and see what address/interface it is using - then use that setting. Using just 0.0.0.0 will result in some other interesting problems with other things that "hang" after your application claims their address. |
|
Advert | |
|
12-29-2012, 02:55 AM | #6 |
Member
Posts: 13
Karma: 13156
Join Date: Feb 2011
Device: Kindle Paperwhite
|
Unfortunately, it appears that the address it's using (per netstat) is 127.0.0.1, which's failure was the original reason for this post. I think that the browser is special-casing on that to disallow, well, this. If there's a better idea available, I'm open to suggestions.
|
12-29-2012, 05:56 AM | #7 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
|
|
12-29-2012, 07:38 AM | #8 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Ah, but is it coded to disallow the entire 127.0.0.0/8 address range that is localhost? Try some of the other 2^24 (-3) addresses on lo if there is any chance they don't special case the entire range. 2) Do you have the network bridging available? Put up a single destination bridge to somewhere in 127.0.0.0/8 Assign an address to the bridge outside of 127.0.0.0/8 Try that. 3) Do you have the dummy interface available? Put that up, give it an address outside of 127.0.0.0/8 Try that. |
|
12-29-2012, 08:23 AM | #9 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
You could try with some other IP (like 127.0.0.2), but you will need to change the iptables configuration first, because by default, the firewall will reject such packets.
|
12-29-2012, 08:27 AM | #10 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
But in general, 127.0.0.0/8 should be allowed, not just one address. I have an "iptables day" in my near future to fill out the other choice not yet described in my "exploring a new Kpw" thread. PS: ixtab - if you want to move these communication controls posts out of your thread and into mine (where they better belong) - go for it! |
|
07-24-2018, 05:04 PM | #11 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
|
127.0.0.2 works in Experimental Browser after
iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -o lo -j ACCEPT Otherwise 127.0.0.1 works straight out of the box in WebLaunch |
07-24-2018, 06:16 PM | #12 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Nothing has changed in the past 6 years.
Allow 127.0.0.0/8 (full range rather than a single address) |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Browser That Does All? | ratkity | Kindle Fire | 12 | 12-09-2011 01:53 PM |
Browser Gone | Raygun7 | Kobo Reader | 1 | 10-24-2011 08:10 AM |
how to browse localhost with wifi off? | bsdcpp | Kindle Developer's Corner | 2 | 05-15-2011 03:43 PM |
Browser? | mesand | Erste Hilfe | 2 | 06-03-2010 02:15 PM |