maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   How to use SOCKS proxy for N900? (https://talk.maemo.org/showthread.php?t=38726)

teddybw 2009-12-29 18:17

How to use SOCKS proxy for N900?
 
I tried to set up a SSH tunnel and use SOCKS5 proxy. However, I could only find HTTP/HTTPS/FTP/RTSP/Automatic proxy set up in Internet Connection setup (Advanced). What is worse, I could not find a place to set up SOCKS proxy for even just for the web browser (default/firefox).

Could I use third party software such as tsocks(http://tsocks.sourceforge.net/index.php) or Dante(http://www.inet.no/dante/) to "socksify" everything?

By the way, how could detect which shell command is used to start any one of the softwares installed?

I appreciate your help.

andree 2009-12-29 20:39

Re: How to use SOCKS proxy for N900?
 
try about:config (enter as url in microB=firefox) - and see network.proxy.socks items ....

as for the shell commands - there's no universal way, but you can always view contents of the deb packages you are installing...

teddybw 2009-12-30 06:42

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by andree (Post 445709)
try about:config (enter as url in microB=firefox) - and see network.proxy.socks items ....

as for the shell commands - there's no universal way, but you can always view contents of the deb packages you are installing...

Thank you for the about:config stuff. I am using a prepaid Sidekick data plan on N900, so at least HTTP port 80 is blocked. After setting up the socks proxy, I am supposed to route all http traffic through the socks tunnel I set up using

ssh -D * username@host

where * is the port number. I tried the 1080 (default), 143 (used by IMAP which works fine under Sidekick), 3128 (used by a free HTTP proxy which works fine if I set up the http proxy in TMobile Internet) and 8080 (T-Mobile HTTP proxy). Unfortunately, however, none of them work for me to access www pages. Neither can I visit web pages even if I enable ssh tunnel for DNS.

What's wrong?

Thanks again.

gnuslov 2010-01-01 15:48

Re: How to use SOCKS proxy for N900?
 
The built-in microb browser doesn't support socks, even if you input all the correct fields in about:config. Fennec/firefox does, though you'll need to configure it manually in about:config. You might want to go that route for now, and hope that socks support gets enabled on the default browser.

tsocks works nicely (i'm using a port by Qole, downloaded from his repository) but you're going to have trouble if you want to use it with microb. Microb is more than just a browser that you, as a user, could start with tsocks -- it's also a daemon that runs at boot time.

Afraid I don't know anything about dante, but I might check into it.

teddybw 2010-01-14 07:23

Re: How to use SOCKS proxy for N900?
 
Thanks.

It is weird that I can NOT input the socks proxy port number in firefox, no matter what way I try. I could use onboard keyboard to input the number in the buildin browser though. How did you manage to input port number in firefox? I use the most up-to-date version (1.0.0).

Quote:

Originally Posted by gnuslov (Post 448908)
The built-in microb browser doesn't support socks, even if you input all the correct fields in about:config. Fennec/firefox does, though you'll need to configure it manually in about:config. You might want to go that route for now, and hope that socks support gets enabled on the default browser.

tsocks works nicely (i'm using a port by Qole, downloaded from his repository) but you're going to have trouble if you want to use it with microb. Microb is more than just a browser that you, as a user, could start with tsocks -- it's also a daemon that runs at boot time.

Afraid I don't know anything about dante, but I might check into it.


daperl 2010-01-14 08:25

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by gnuslov (Post 448908)
The built-in microb browser doesn't support socks, even if you input all the correct fields in about:config.

This is not true. If you combine the following about:config settings with your ssh -D command, it works:

network.proxy.socks localhost
network.proxy.socks_port 3210
network.proxy.socks_remote_dns true
network.proxy.type 1

And remember, http://whatsyourip.org/ is your friend.

Why Nokia left the SOCKS fields out of the advanced network settings is a mystery to me, but there's a bug filed. Please vote for it; it's easy to find if you search for "proxy."

And as far as entering numbers in about:config: You can only get the dialog by selecting the field. and pressing the physical return key. Then, when the dialog comes up, close the keyboard and use the virtual keyboard. Bizarre, but it works.

teddybw 2010-01-17 07:55

Re: How to use SOCKS proxy for N900?
 
Thank you. It turned out that I did not set up "network.proxy.type 1" on the built-in browser.

I know the trick to type number in the build-in browser, but I still cannot enter numbers in the setting of firefox (not built-in one, but the standalone one). Any ideas?

Thanks again

Quote:

Originally Posted by daperl (Post 469918)
This is not true. If you combine the following about:config settings with your ssh -D command, it works:

network.proxy.socks localhost
network.proxy.socks_port 3210
network.proxy.socks_remote_dns true
network.proxy.type 1

And remember, http://whatsyourip.org/ is your friend.

Why Nokia left the SOCKS fields out of the advanced network settings is a mystery to me, but there's a bug filed. Please vote for it; it's easy to find if you search for "proxy."

And as far as entering numbers in about:config: You can only get the dialog by selecting the field. and pressing the physical return key. Then, when the dialog comes up, close the keyboard and use the virtual keyboard. Bizarre, but it works.


daperl 2010-01-17 16:50

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by teddybw (Post 477612)
Thank you. It turned out that I did not set up "network.proxy.type 1" on the built-in browser.

Yeah, I would have been pulling my hair out on that one if someone on this forum (I think it was qole) hadn't already blazed that trail.

Quote:

I know the trick to type number in the build-in browser, but I still cannot enter numbers in the setting of firefox (not built-in one, but the standalone one). Any ideas?

Thanks again
All I can think of is using something like the Notes app for copying, and then try both the virtual and physical keyboard's for selecting-and-paisting. Paist on the physical keyboard is Ctrl-v and select is Shift-arrow. It seeems it's all about getting keyboard focus, so maybe also try turning the virtual keyboard on and off with Settings->Text input->Use virtual keyboard. Good luck!

Pigro 2010-02-25 16:44

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by gnuslov (Post 448908)
tsocks works nicely (i'm using a port by Qole, downloaded from his repository)

Hi. I have done some messing about today & managed to route over an ssh tunnel from my n900 back to my home XP box using the dynamic flag. So, while connected over GPRS I checked my IP on a website & it was that of the public IP of my home router/ISP.

I did this because I would ultimately like to use rDesktop on the n900 for remote support of a client's Windows servers. They are located in a telco switch room, behind a nasty firewall. My (static) home IP is allowed through the f/w but obviously my n900 has a dynamic IP (on Vodafone UK). So, I can currently rDesktop into the clients servers from my home PC and also from my n900 whilst on home wifi. I can't currently connect over 3G on the n900 while out & about.

I think that if I had tsocks installed, I could start an ssh tunnel from n900 to my home LAN and then run rDesktop via tsocks - such that the n900 connects to my client's Windows Server using my home static IP, so it gets through the Telco firewall?

Not sure if that is feasible at all (any advice appeciated) but meantime just wondered wether the tsocks port by Qole is something that will at some stage be made publically available via the maemo repo's?

Pigro 2010-02-26 18:00

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by Pigro (Post 546120)
I think that if I had tsocks installed, I could start an ssh tunnel from n900 to my home LAN and then run rDesktop via tsocks - such that the n900 connects to my client's Windows Server using my home static IP, so it gets through the Telco firewall?

Not sure if that is feasible at all (any advice appeciated)

just did it - so can confirm that yes, it works. Happy bunny!!

Quote:

Originally Posted by Pigro (Post 546120)
but meantime just wondered wether the tsocks port by Qole is something that will at some stage be made publically available via the maemo repo's?

I found out that it is available form Qole's own repo (see his website for details if interested, it's in his sig)

Ok, fed up replying to myself for today, bye Pigro :D

mail_e36 2010-02-26 22:35

Re: How to use SOCKS proxy for N900?
 
Folks,

Doesn't the Tor application for the N900 somehow make use of a SOCKS proxy, all done via command line, and all transparent to the user?

Can we leverage that concept to set our own SOCKS proxy?

ticktock666 2010-03-01 13:41

Re: How to use SOCKS proxy for N900?
 
ok, this took me sometime to do but I finally managed to get fennec/firefox to use the socks proxy.

I'm not sure if I did anything special, but I was able to change the SOCKS port in about:config, once you highlight the option then press enter on the physical keyboard, it gives a window that doesn't seem to allow for any editing.

what I did was this : after pressing the enter button on the "network.socks.port" line in about:config, I "Did Not" click on the screen at all, I simply held down the right arrow on the keyboard to make sure I reached the end of the field, then pressed "backspace" a couple of times, and finally entered the new port (9966 in my case) and clicked the physical "enter" button on the keyboard to finish and it worked, this trick also works for the "network.proxy.type" which needs to be changed to "1", it's set to "5" originally.

on another matter,I've been trying to use tsocks, and my edited tsocks.conf file has the following entries :

local = 192.168.1.0/255.255.255.0

#default server
server = 212.117.160.44

Server_type = 5

Server_port = 9966 (the port I want to tunnel through)

now I'm confused : do I start the ssh tunnel from a terminal window (ssh -D...etc) then run "tsocks fennec" from another terminal ? or do I simply use the "tsocks fennec" command and it will be enough, and do I need to add a username for the server in the tsocks.conf file ?

any help would be appreciated, like I said I can use firefox by changing the settings in the about:config but I'd like to be able to use tsocks for other apps.

mail_e36 2010-03-01 16:39

Re: How to use SOCKS proxy for N900?
 
I would also like to use tsocks, I hope someone responds to the last poster...

thanks

Pigro 2010-03-02 00:02

Re: How to use SOCKS proxy for N900?
 
set the tsocks.conf default server to 127.0.0.1 and the port to <yourPort>.

then start ssh socks proxy with
ssh -D <yourPort> user@server.

then run tsocks <yourApp> and tsocks will intercept comms and point them to your ssh.

ticktock666 2010-03-02 12:54

Re: How to use SOCKS proxy for N900?
 
thanks for the help, things working great now :)

any idea how to launch the facebook app using tsocks, I'm not very clear on the command & path to where the apps are installed.

cheers.

Pigro 2010-03-02 13:58

Re: How to use SOCKS proxy for N900?
 
I assume you mean the facebook widget? sorry, no idea about that, though I assume that the widget spawns a separate process periodically to do an https session to the facebook server to fetch any updates, so if you can track down the call and it's possible to hack it to use tsocks then you are in luck?

Probably best to wait for someone who knows about how/where widget-created processes get launched on n900 to let you try to proxify it properly though :-)

ticktock666 2010-03-08 13:33

Re: How to use SOCKS proxy for N900?
 
ok, tsocks is all fine and nice but I have been unable to launch the default browser using tsocks, I've tried "tsocks browser" but I get an error message :
invalid string constant "osso-combobox-entry-arrow", expected valid string constant

I'm not sure what this means but the terminal just hangs there until I Ctrl-C/kill it, what am I doing wrong here ?

I've also tried tsocks /usr/bin/browser and got the same error.

AMLJ 2011-02-21 17:43

Re: How to use SOCKS proxy for N900?
 
I didn't know about this thread... You can get it working, without using tsocks or anything else... tsocks is fine, I use it for some things, but why use it when there are easier and better ways?

See a How-To on my blog:http://www.adelamlj.com/index.php?op...n900&Itemid=71

xopher 2011-02-21 19:18

Re: How to use SOCKS proxy for N900?
 
I have this working via SSH tunnel and do not have to enable/disable proxy in about:config ever.....this can be configured on a per connection profile via System, Settings, Internet Connections. This removes the need of having to change the 0 to a 1 in network.proxy.type each time you want proxy. My steps......

In microb:

In adddress bar go to about:config

change:

network.proxy.http_port to your chosen port
network.proxy.socks to localhost
network.proxy.socks_port to your chosen port above
network.proxy.ssl_port again your chosen port

Then under System, Settings, Internet Connections, Connections

find the connection you wish to use the proxy with.......then edit....next....next....advanced.....

Check Use Proxy
then ONLY fill in the fields for Port numbers for HTTP and HTTPS proxy with ....you guessed it your chosen port number.

You may want to scroll down and fill in the Do not user proxy for section with what makes sense to you.

Last......you need your ssh command. I highly suggest creating a public key for passwordless login to the host and embedding this command in a script. I call my script pxy and placed it in /usr/bin for a quick execution to establish my tunnel, my command is as follows:

ssh your remote host -p your remote port -l your remote username -nN -D your chosen local proxy port -o ConnectTimeout=5 NumberofPasswordPrompts=1 &

Hope this helps someone, I'll help where I can. I won't be watching this thread closely please feel free to PM for help. This works flawless for me. I suggest installing an alternative browser as well as they will not bide by the proxy settings in the event you need to authenticate with a captive portal unless you build the exception in the "Do not use proxy for" section of the Internet connection

_invisible_ 2011-06-02 17:30

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by daperl (Post 469918)
This is not true. If you combine the following about:config settings with your ssh -D command, it works:

network.proxy.socks localhost
network.proxy.socks_port 3210
network.proxy.socks_remote_dns true
network.proxy.type 1

And remember, http://whatsyourip.org/ is your friend.

Why Nokia left the SOCKS fields out of the advanced network settings is a mystery to me, but there's a bug filed. Please vote for it; it's easy to find if you search for "proxy."

And as far as entering numbers in about:config: You can only get the dialog by selecting the field. and pressing the physical return key. Then, when the dialog comes up, close the keyboard and use the virtual keyboard. Bizarre, but it works.

He is right. I have tried his settings and it works.
The only different setting that i have is the port number wich is 7070 on me. but it works verry nice.
Nice one man:)

macey 2013-04-06 02:51

Re: How to use SOCKS proxy for N900?
 
Great, does anyone here know how to get email working via ssh/socks?
I have had a search but cant find any answers.

macey 2013-04-07 07:22

Re: How to use SOCKS proxy for N900?
 
Quote:

Originally Posted by macey (Post 1334399)
Great, does anyone here know how to get email working via ssh/socks?
I have had a search but cant find any answers.

Shameless 'bump'.
There must be someone here that knows how to do this?:confused:


All times are GMT. The time now is 13:47.

vBulletin® Version 3.8.8