Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2012, 11:10 PM   #1
alethiophile
Member
alethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy blue
 
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.
alethiophile is offline   Reply With Quote
Old 12-29-2012, 12:42 AM   #2
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
Try 0.0.0.0 instead of localhost
aditya3098 is offline   Reply With Quote
Old 12-29-2012, 02:26 AM   #3
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by aditya3098 View Post
Try 0.0.0.0 instead of localhost
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
knc1 is offline   Reply With Quote
Old 12-29-2012, 02:35 AM   #4
alethiophile
Member
alethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy blue
 
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.
alethiophile is offline   Reply With Quote
Old 12-29-2012, 02:39 AM   #5
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by alethiophile View Post
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.
Once that connection is made -
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.
knc1 is offline   Reply With Quote
Old 12-29-2012, 02:55 AM   #6
alethiophile
Member
alethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy bluealethiophile can differentiate black from dark navy blue
 
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.
alethiophile is offline   Reply With Quote
Old 12-29-2012, 05:56 AM   #7
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by alethiophile View Post
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.
Correct. The browser has hard-coded instructions which disallow access to 127.0.0.1.
ixtab is offline   Reply With Quote
Old 12-29-2012, 07:38 AM   #8
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by ixtab View Post
Correct. The browser has hard-coded instructions which disallow access to 127.0.0.1.
1)
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.
knc1 is offline   Reply With Quote
Old 12-29-2012, 08:23 AM   #9
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by knc1 View Post
1)
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.
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.
ixtab is offline   Reply With Quote
Old 12-29-2012, 08:27 AM   #10
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by ixtab View Post
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.
I haven't looked at the iptables entries (yet).
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!
knc1 is offline   Reply With Quote
Old 07-24-2018, 05:04 PM   #11
aleq
Enthusiast
aleq began at the beginning.
 
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
aleq is offline   Reply With Quote
Old 07-24-2018, 06:16 PM   #12
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
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)
knc1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:19 AM.


MobileRead.com is a privately owned, operated and funded community.