We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

jolla-store work through http(s) proxy?

asked 2015-08-07 07:44:37 +0300

Jfish gravatar image

updated 2015-08-14 19:19:23 +0300

Hello!

I use Jolla 3rd day and I can not connect to the jolla-store through a WiFi with http proxy set. In the terminal, you can see that the store-client is connected directly to the port 443(without proxy server). I would like to make the applications work through a proxy(such as sailfish-maps, sailfish-weather) SailfishOS 1.1.6.27

edit retag flag offensive close delete

Comments

Today I tried to use iptables, redsocks and to work through http(s) proxy server(Squid) applications like sailfish-maps and store-client. It's works!

Jfish ( 2015-08-14 19:26:23 +0300 )edit

@Jfish Great! I'll close this as answered, contact me if you want to reopen it

jollailija ( 2015-08-15 13:43:08 +0300 )edit

Good. But I would like to have working with a proxy as a standard feature of Jolla phone without such tricks as iptables and redsocks.

Jfish ( 2015-08-15 17:14:43 +0300 )edit

Can you please tell us more explicitly the procedure you followed and post it as an answer?

AliN ( 2015-08-16 14:35:00 +0300 )edit

@Jfish Can you convert your first comment to answer, and update it with some more info? @jollailija Better to close questions only after there is an accepted answer

simo ( 2015-08-16 16:39:41 +0300 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2015-08-17 10:01:41 +0300

Jfish gravatar image

updated 2015-08-17 10:02:35 +0300

That's my little solution:

  1. Install libevent and redsocks.
  2. Install sudo (pkcon install sudo) (this for iptables run from user nemo)
  3. Add sttring to /etc/sudoers file

    nemo ALL=(ALL) NOPASSWD:/usr/local/bin/iptables-proxy.sh

  4. Create file /usr/local/bin/iptables-proxy.sh. This script set and unset iptables rules REDIRECT 80,8080,443 tcp ports on redsocks invoked from myproxy.sh
  5. And create file /home/nemo/bin/myproxy.sh. This script proxy set(make config for redsocks -> run redsocks -> set iptables rules) and proxy unset(kill redsocks -> unset iptables rules). Script gets http proxy from of the wlan profile running.

  6. Run script /home/nemo/bin/myproxy.sh on set proxy and /home/nemo/bin/myproxy.sh off unset proxy (manual) or run script after connect.

edit flag offensive delete publish link more

Comments

Now the only problem jolla-browser unable to find the proxy server, although the console ping proxyname works. :)

Jfish ( 2015-08-17 10:12:48 +0300 )edit

I have two questions:

  1. Redsocks description says "you use tor", so do we need Tor for all of these to work?

  2. Did you change proxy-related variables on the Jolla browser's about:config?

AliN ( 2015-08-17 11:10:56 +0300 )edit
  1. No. Tor is not needed. Redsoks accepts connections on tcp ports 127.0.0.1:12345 and 127.0.0.1:12344, and translates them into connection through a proxy server which is registered in the active profile wlan.

  2. No.Browser does know how to work through a proxy it takes wlan configuration profile. I does not work because DNS subsystem jolla phone(dns cache). I rebooted the phone to reset the dns cache, and it worked. Maybe someone will knows as a reset DNS cache?

Jfish ( 2015-08-17 11:41:09 +0300 )edit

@Jfish How could you install the said packages if the store is not connected? How could I get the terminal ?

walkingzen ( 2016-10-05 10:32:47 +0300 )edit
1

@walkingzen Hello! I switch developer mode(this installed terminal app) on(when internet worked). Download and install packages

pkcon install-local libevent-2.0.21-0.armv7hl

pkcon install-local redsocks-0.4-0.armv7hl

Jfish ( 2016-10-20 20:56:41 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-08-07 07:44:37 +0300

Seen: 837 times

Last updated: Aug 17 '15