maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900:How to connect internet using proxy (https://talk.maemo.org/showthread.php?t=38054)

edcarsky 2010-07-19 07:29

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 756452)
You need to install leafpad in app manager first. Look at #36, I explicitly told you to install leafpad first.

leafpad is the right command for you to remove that http_proxy lines in your /etc/profile

Other text editor might be not be too suitable for you.

It's not that http_proxy does not work for you. The problem is your http_proxy does not appear even though you've enter it in your /etc/profile. Therefore, in view of your situation I'd recommend you to revert what you've done rather than pursue any further.

I hope you'd understand.


Okay,,, sorry for the confusion. I think i understand now,,, i'll let you know when i succeeded already, thanks :D

I've already reverted the /etc/profile, sorry my apology.

9000 2010-07-19 07:43

Re: N900:How to connect internet using proxy
 
My apology indeed, it's so much we can do over the air.

Actually I just found out in other thread here that people has discussed this before and come up with the same solution. I'm not sure if you should pursue in this direction. Your choice. ^^

edcarsky 2010-07-19 09:06

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 756470)
My apology indeed, it's so much we can do over the air.

Actually I just found out in other thread here that people has discussed this before and come up with the same solution. I'm not sure if you should pursue in this direction. Your choice. ^^

Ok, i have now little problem.

I dont have leafpad and cannot now install apps through Apps Manager, message error:

http://repository.maemo.org........... (as in all repo catalogs)
could not resolve 'xxx.xx.x.xx'

please advise another option how to remove or re solve my exported proxy. so in that way i can use apps manager.

i read some thread, i think unset http_proxy or something,,, please give me right command syntax, maybe this would be help.

NOTE: Browser still working

9000 2010-07-19 09:35

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by edcarsky (Post 756534)
Ok, i have now little problem.

I dont have leafpad and cannot now install apps through Apps Manager, message error:

http://repository.maemo.org........... (as in all repo catalogs)
could not resolve 'xxx.xx.x.xx'

please advise another option how to remove or re solve my exported proxy. so in that way i can use apps manager.

i read some thread, i think unset http_proxy or something,,, please give me right command syntax, maybe this would be help.

NOTE: Browser still working

Try this:

Code:

root
cat /etc/profile | grep -i -v http_proxy > profile.tmp
cat profile.tmp

The last line display the content of the profile.tmp you've just created in the second line.

If you think it sounds alright (no more http_proxy, and the rest looks good), then you can copy it back to /etc/profile:

Code:

cp profile.tmp /etc/profile
Actually you don't need to reboot. I've tested any change to /etc/profile takes effect immediately.

Hope this help.

edcarsky 2010-07-19 09:44

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 756559)
Try this:

Code:

root
cat /etc/profile | grep -i -v http_proxy > profile.tmp
cat profile.tmp

The last line display the content of the profile.tmp you've just created in the second line.

If you think it sounds alright (no more http_proxy, and the rest looks good), then you can copy it back to /etc/profile:

Code:

cp profile.tmp /etc/profile
Actually you don't need to reboot. I've tested any change to /etc/profile takes effect immediately.

Hope this help.

Thank you, i'ts now back to normal, i can now use Apps Manager.

mathina 2010-07-19 09:50

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 749136)
I must say beforehand that I have no working proxy to test the following myself, but normally the systemwise http proxy work this way. So please tell me the result.

In /etc/profile add the following:

Code:

http_proxy="http://username:password@addressofproxy"
I dont know if you need to restart.

i would suggest you to use The onion router (TOR)

9000 2010-07-19 10:00

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by mathina (Post 756573)
i would suggest you to use The onion router (TOR)

Good idea...with some setup it might be able work to fit his purpose. Please give him some pointers.

9000 2010-07-19 15:31

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by edcarsky (Post 756570)
Thank you, i'ts now back to normal, i can now use Apps Manager.

This shows that the http_proxy took effect but the format is incorrect. However, before you pursue in this direction any further you really need to get familiar with at least one text editor.

edcarsky 2010-07-20 09:59

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 755822)
Look like your result is quite different from ours. I've entered the line into my own /etc/profile and I got the following:
Code:

export | grep -i http_proxy
export http_proxy="http://127.0.0.1/"

The only different are the quotes. You could try adding back the quotes, however at this point I recommend you not messing with it any further. You need to revert the change now.

1) Install leafpad
2) run the following in xterminal
Code:

sudo leafpad /etc/profile
3) remove the last two lines containing http_proxy
4) click on the top bar to drop down a menu where you could find 'Save'. Save the file
5) Exit the program

i think its working already,,, Mauku and some apps are still not working especially VoIP (i really need to use IM's through my device),,, any option in mind???

9000 2010-07-20 10:35

Re: N900:How to connect internet using proxy
 
From what you described I dont see it ever working at all. I must have missed something.

cjard 2010-07-20 10:41

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by edcarsky (Post 757635)
Mauku and some apps are still not working especially VoIP (i really need to use IM's through my device),,, any option in mind???

I think you misunderstand proxies.. A HTTP proxy is designed to fetch web pages and other data from web servers. Your phone says to the proxy "get me the following file: (a web page or download, image etc)" and the proxy gets it and sends it to the browser

IM and VoIP use COMPLETELY different connectivity to the internet. Unless your IM program has an option to connect to a web server and send it data then it WONT work with an HTTP proxy! HTTP is web only! Most IMs and definitely most VoIPs dont run on HTTP

Maybe, they could use the RTSP proxy that you can also set in the conenction options, but then you need to have a proxy that understands RTSP..

The whole point of providing a closed network at work, an HTTP proxy and then making all the web traffic go through the HTTP proxy is:
a) no other traffic (msn, jabber, skype, voip, im, ftp, vnc, remote desktop, time protocol, telnet, sqlserver etc etc [the list goes on.. hopefully youre getting to understand that there is more to the internet than just web/http) can get out. This stops your workers sitting on their assk chatting all day
b) you can control which sites they go to by having the proxy deny the access


Now, lot of things sprang up around HTTP (like web services) because they were suited to work over HTTP and existing firewalls didnt have to be reconfigured. Sometimes there are ways of tunneling data through an HTTP proxy so it can connect to another service that is not HTTP, but generally you cant.

You can generally ONLY run applications that know how to use the HTTP protocol to do their work. MSN Messanger CAN use http to work for example but exactly how it does it is beyond the scope of a forum posting

edcarsky 2010-07-20 10:42

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 757670)
From what you described I dont see it ever working at all. I must have missed something.

Ok,,, i just used this following config below, and it's work in some apps like Mauku, others are not in which is my major concerns like VoIP or IM's.

If you could help me through your brilliant ideas or in any way how to work VoIP, that would be great. =)

export | grep -i http_proxy
export http_proxy="http://xxx.xx.x.xx:port/"

edcarsky 2010-07-20 10:50

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by cjard (Post 757676)
I think you misunderstand proxies.. A HTTP proxy is designed to fetch web pages and other data from web servers. Your phone says to the proxy "get me the following file: (a web page or download, image etc)" and the proxy gets it and sends it to the browser

IM and VoIP use COMPLETELY different connectivity to the internet. Unless your IM program has an option to connect to a web server and send it data then it WONT work with an HTTP proxy! HTTP is web only! Most IMs and definitely most VoIPs dont run on HTTP

Maybe, they could use the RTSP proxy that you can also set in the conenction options, but then you need to have a proxy that understands RTSP..

The whole point of providing a closed network at work, an HTTP proxy and then making all the web traffic go through the HTTP proxy is:
a) no other traffic (msn, jabber, skype, voip, im, ftp, vnc, remote desktop, time protocol, telnet, sqlserver etc etc [the list goes on.. hopefully youre getting to understand that there is more to the internet than just web/http) can get out. This stops your workers sitting on their assk chatting all day
b) you can control which sites they go to by having the proxy deny the access


Now, lot of things sprang up around HTTP (like web services) because they were suited to work over HTTP and existing firewalls didnt have to be reconfigured. Sometimes there are ways of tunneling data through an HTTP proxy so it can connect to another service that is not HTTP, but generally you cant.

You can generally ONLY run applications that know how to use the HTTP protocol to do their work. MSN Messanger CAN use http to work for example but exactly how it does it is beyond the scope of a forum posting


Thank you for your full information, i am aware of those details and i have no question to that. What i am asking for is that, is there anyway to use http (proxy) connection to use our 3rd party apps, in which you've already discussed above.

9000 2010-07-20 13:47

Re: N900:How to connect internet using proxy
 
Once you confirm the http_proxy working with your http traffic then you proceed to create a tun device by ssh over http proxy. I'll get the early flight tomorrow for my long awaited vacation so in the meanwhile you could consult cjard for detail as he obviously knows more than anyone else here. See ya guys again next week.

edcarsky 2010-07-22 06:07

Re: N900:How to connect internet using proxy
 
i am currently using non-proxy setup, and i think export_http is having disturbance right now with me and i cannot connect my apps in internet.

please give me advise on how can i remove this, thanks

edcarsky 2010-07-28 16:46

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by edcarsky (Post 760274)
i am currently using non-proxy setup, and i think export http_proxy is having disturbance right now with me and i cannot connect my apps in internet.

please give me advise on how can i remove this, thanks

Guys, please help me again, badly!.

Currently i am no longer using proxy connection anymore, since i used export http_proxy command before, now i cannot connect to internet at all. i've tried already the previous thread instruction above, but still i cannot connect.

Can you give me another instruction to return /etc/profile (normal mode) so i can use my device using non-proxy connection. Thank you.

9000 2010-07-28 17:02

Re: N900:How to connect internet using proxy
 
As root edit the file directly.

First cat the file to look at its content:

Code:

cat /etc/profile
If the http_proxy line exist, use leafpad to edit the file

Code:

root
leafpad /etc/profile


edcarsky 2010-07-28 17:10

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 768017)
As root edit the file directly.

First cat the file to look at its content:

Code:

cat /etc/profile
If the http_proxy line exist, use leafpad to edit the file

Code:

root
leafpad /etc/profile


thanks again @9000, sorry to bothered! still i cannot resolve this.

root
leafpad /etc/profile
is not working with me
MESSAGE: Cannot open display.

[please advise here what i shall i do]

It work only at

sudo gainroot
leafpad /etc/profile

but i accidentally removed all inside the /etc/profile (via leafpad),

please advise how i can return /etc/profile (file)

[please advise here what i shall i do]

Thanks

9000 2010-07-28 17:21

Re: N900:How to connect internet using proxy
 
iirc you've the backup of this file. Just copy it back.

Code:

cp /etc/profile.tmp /etc/profile
and re-edit it again.

BTW, It's strange that i don't have the display problem when using 'root' instead of 'sudo gainroot'.

edcarsky 2010-07-28 17:31

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 768045)
iirc you've the backup of this file. Just copy it back.

Code:

cp /etc/profile.tmp /etc/profile
and re-edit it again.

BTW, It's strange that i don't have the display problem when using 'root' instead of 'sudo gainroot'.

ERROR MESSAGE:

Code:
cp /etc/profile.tmp /etc/profile

cp: cannot stat '/etc/profile.tmp'; no such file or directory.

9000 2010-07-28 17:34

Re: N900:How to connect internet using proxy
 
Before continue I'd like to ask you two questions:

1) In http://talk.maemo.org/showpost.php?p...0&postcount=45 you said it's back to normal. What did you do after that?
2) I don't think I've given any explicit instruction on deleting profile.tmp. I wondered if you've really followed my instructions on creating profile.tmp before?

edcarsky 2010-07-28 17:55

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 768060)
Before continue I'd like to ask you two questions:

1) In http://talk.maemo.org/showpost.php?p...0&postcount=45 you said it's back to normal. What did you do after that?
2) I don't think I've given any explicit instruction on deleting profile.tmp. I wondered if you've really followed my instructions on creating profile.tmp before?

yes i did that before, and it's work. but now it's not working, don't know why.

/etc/profile.tmp was been created, but when i try to edit leafpad /etc/profile is (via sudo gainroot, not in root because its not working there like i mentioned earlier) nothing inside the file (i mean, the file is empty), please advise.

apology for the inconvenience, i would highly appreciate your help, thanks.

9000 2010-07-28 18:05

Re: N900:How to connect internet using proxy
 
Obviously you failed to follow my instructions, otherwise the profile.tmp should be there. In view of this, please stop messing around after fixing the /etc/profile. As you may see, you'd do more damage than good in your journey of discovery.

Just copy and paste the following back to /etc/profile, cat /etc/profile to make sure they're there, then reboot, and you'd be fine:

Code:

export PATH="/usr/bin:/bin"

umask 022
source /etc/osso-af-init/af-defines.sh

Remember to cat /etc/profile to make sure the content are there before reboot. After that, please give up on tinkering your N900 anymore.

edcarsky 2010-07-28 18:24

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by 9000 (Post 768098)
Obviously you failed to follow my instructions, otherwise the profile.tmp should be there. In view of this, please stop messing around after fixing the /etc/profile. As you may see, you'd do more damage than good in your journey of discovery.

Just copy and paste the following back to /etc/profile, cat /etc/profile to make sure they're there, then reboot, and you'd be fine:

Code:

export PATH="/usr/bin:/bin"

umask 022
source /etc/osso-af-init/af-defines.sh

Remember to cat /etc/profile to make sure the content are there before reboot. After that, please give up on tinkering your N900 anymore.

thank you very much for your time, truly appreciated.

9000 2010-07-28 18:37

Re: N900:How to connect internet using proxy
 
Quote:

Originally Posted by edcarsky (Post 768133)
thank you very much for your time, truly appreciated.

No problem. Good luck.

mdkaleem777 2011-04-15 10:57

Re: N900:How to connect internet using proxy
 
hi this is kaleem
Quote:

Originally Posted by edcarsky (Post 748882)
Do you have any idea or suggestion to bypass proxy connection so any application and IM's can be work? Please advise.



All times are GMT. The time now is 23:24.

vBulletin® Version 3.8.8