Running seafile client behind a proxy using proxychains

2,517 vistas
Ir al primer mensaje no leído

Alfredo

no leída,
27 nov 2013, 10:55:17 a.m.27/11/2013
para sea...@googlegroups.com
First of all, I have to say that I'm very impressed so far with both Seafile client 2.0.8 (running on Ubuntu) and server 2.0.3 (running on Arch Linux). It really is a strong Dropbox contender and the fact that it runs on a server that you OWN means that you don't have to worry about Obama going over your files and sharing them with his friends. I don't have anything to hide, but I don't like the idea of Big Brother spying on everything I do...

It was a bit difficult to get Seafile to work though and I suppose the wiki could potentially include more details as to exactly how each of the components interact, as well as more troubleshooting scenarios and more details about the dependencies. Hopefully some of the feedback gathered in this forum will be incorporated to the wiki at some point.

Having said that, one common complaint is that as it stands the Linux version of Seafile client (not sure about the Mac or the Windows versions) cannot be set up to use a proxy server. I think there's one thread where the developers mention that there will be a version of the client that will support connections via a socks server in the next few months.

Well, in the meantime I have made the Seafile client work via a socks proxy server using proxychains. And I would like to share here the settings I'm using in the hope it will help somebody else.

Step 1) First you need to make sure that your Seafile server is accessible on the Internet, i.e. you need to make sure you open the right ports on your Internet router and forward them to the machine running your Seafile server. That's covered to some detail on the wiki: https://github.com/haiwen/seafile/wiki/Firewall-settings-for-seafile-server

You should open/forward the ports for ccnet and seaf-server as well as port 80 and/or 443 (if you use SSL) for Seafile's web component (Seahub), which in my case is served by NginX. If you have the web component on another port (like 8080), use that port instead.
   
Step 2) Make sure your server is properly configured in seahub_settings.py, ccnet.conf and seafile.conf. I had a problem in which I was using my server's local network IP address in SERVICE_URL in ccnet.conf and that was giving me headaches when connecting from outside the server's network. Make sure that this variable is set to the address accessible from outside your network. E.g. if your server address is myseafile.example.com at port 80 (no SSL), then use SERVICE_URL = http://myseafile.example.com.

Step 3) Install proxychains from the Ubuntu repositories (or your distro's repositories). The version they have in the Ubuntu repos is 3.1, which is the one I'm using. There's a fork somewhere called "proxychains next generation" (proxychains-ng), which is more up to date than the 3.1 version. I haven't tried that one, I suppose you could use that as well. But just pay attention with the configuration settings for that version as they're slightly different from proxychains 3.1.
   
Step 4) Configure proxychains to use your company's or school's socks proxy server. Obviously, you need to find out the IP address of your company's or school's socks proxy server. Also, you need to make sure it allows connections to the ports that your seafile installation is using. Remember: you only need a minimum of three ports: one for web access (80 or 443) and one for ccnet and one for seaf-server. I'm behind a very restrictive firewall and they only allow connections to a few specific ports. 80 and 443 are two of them. But they also allow ports used by software I don't use (like MSN Messenger and the like), so I use those ports.
   
Now, proxychains can be configured (assuming that 123.123.123.123 is the IP address of your company's/school's socks proxy server and 1080 its port):

strict_chain
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks4    123.123.123.123        1080
localnet 127.0.0.1 000 255.255.255.255

Save these settings in ONE of these files:
  • ./proxychains.conf
  • $(HOME)/.proxychains/proxychains.conf
  • /etc/proxychains.conf
More details on how to use proxychains: http://proxychains.sourceforge.net/howto.html

Step 5) Install the Seafile desktop client from http://www.seafile.com/en/download/

Step 6) Run the Seafile desktop client from the command line with:
$ proxychains seafile-applet

And that's it.

If you're on Windows, you could probably try Proxifier, a program that does pretty much the same thing as proxychains. I haven't tried it with seafile desktop client, but it *should* work.


Lingtao Pan

no leída,
29 nov 2013, 4:47:43 a.m.29/11/2013
para sea...@googlegroups.com
Thanks very much!

Maximilian Duell

no leída,
12 jun 2014, 4:49:28 a.m.12/6/2014
para sea...@googlegroups.com
I tried this using ssh,

 ssh -N -D 127.0.0.1:1080 your-ssh-gateway
 proxychains seafile-applet

It seems to connect, but almost immediately I get a graphical dialogue "seafile dameon has exited abnormally"
 

Maximilian Duell

no leída,
12 jun 2014, 5:11:35 a.m.12/6/2014
para sea...@googlegroups.com

Ok, if I start ccnet and seaf-deamon from the cli it works, e.g. like
proxychains ccnet -c /home/user/.ccnet --daemon
proxychains seaf-daemon -c /home/user/.ccnet -d /home/user/path-to/.seafile-data -w /home/user/seafile-workdir --daemon
I have extracted the command arguments from a ps listing, with started but defunct seafile-applet

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos