Hot answers tagged

14

ssh -D 8080 name@myserver.com export http_proxy=socks5://127.0.0.1:8080 https_proxy=socks5://127.0.0.1:8080 youtube-dl youtube.com/watch?V=3XjwiV-6_CA


14

Here is how it does it: static int getdestaddr_iptables(int fd, const struct sockaddr_in *client, const struct sockaddr_in *bindaddr, struct sockaddr_in *destaddr) { socklen_t socklen = sizeof(*destaddr); int error; error = getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, destaddr, &socklen); if (error) { ...


11

If the ssh on the proxy side is new enough (>= OpenSSH 5.4), you can use its -W option which works similar than nc. Add to the corresponding entry in your .ssh/config file: ProxyCommand ssh -W %h:%p PROXYHOST Example: Host TARGETHOST ProxyCommand ssh -W %h:%p PROXYHOST HostName 10.0.0.1


10

You could do what the browser does, i.e. connect to the proxy, $ telnet proxy-server 3128 and talk to it. If there was no authentication, a simple GET request (followed by two newlines (Enter)) with a full hostname and protocol, e.g. GET http://www.google.com/ HTTP/1.1 should suffice. Since you need authentication, you need to provide your username ...


10

You could try URL-encoding your password. @ should be replaced by %40. Tackling Special Characters in Proxy Passwords on Linux indicates this should work, but looking around other people seem not to get that to work (and I have no way of testing this).


10

It sounds to me like you need a socks client, or a ssh client that understand socks. -D is for ssh to be a socks server/proxy. You could use ssh under tsocks, or another SOCKS wrapper. Or use ssh's ProxyCommand in conjunction with socat or nc -X: ssh -o ProxyCommand='socat - socks:B:%h:21,socksport=1080' C To have a HTTP proxy that uses the SOCKS server ...


8

The performance problem arise when you are tunneling TCP over TCP because you have two layers doing adaptive corrections (slow start, congestion avoidance, fast restransmit see RFC2001). Not bieng aware of one another they will experience great difficulties if you have loss on the outer connection. This page describes the phenomenon in detail. edit: ...


8

Try mitmproxy. mitmproxy is an SSL-capable man-in-the-middle proxy for HTTP. It provides a console interface that allows traffic flows to be inspected and edited on the fly. mitmdump is the command-line version of mitmproxy, with the same functionality but without the user interface. Think tcpdump for HTTP. Features Intercept HTTP requests and ...


8

From what I understand, setting proxies system-wide via that GUI does three things: Set the corresponding values in the dconf database. Set the values in /etc/environment. Set the values in /etc/apt/apt.conf. 1 and 3 take effect immediately. /etc/environment is parsed on login, so you will need to logout and login for that to take effect. (Note that this ...


7

Both Perl and Python (and probably Ruby as well) have simple kits that you can use to quickly build simple HTTP proxies. In Perl, use HTTP::Proxy. Here's the 3-line example from the documentation. Add filters to filter, log or rewrite requests or responses; see the documentation for examples. use HTTP::Proxy; my $proxy = HTTP::Proxy->new( port => ...


7

If using ProxyCommand, you must use something like /usr/bin/nc to connect the server. For invoking your command before connect, you need to use sh -c "command list" to merge the two commands as one. Host remote.machine ProxyCommand sh -c "local_command; /usr/bin/nc %h %p" MORE: If your local_command is too complicated, you can use a script: cat ...


7

Youtube-dl doesn't support a SOCKS proxy. There's a feature request for it, with links to a couple of working proposals. Youtube-dl supports HTTP proxies out of the box. To benefit from this support, you'll need to run a proxy on myserver.com. Pretty much any lightweight proxy will do, for example tinyproxy. The proxy only needs to listen to local ...


7

NOT necessary use http_proxy , try this : curl -x PROXY-SERVER:PORT -U USER:PASS URL curl -x 127.0.0.1:8123 -U XXXXX:Pass "http://example.com/blub/bla.bin"


6

Netcat is not a specialized HTTP client. Connecting through a proxy server for Netcat thus means creating a TCP connection through the server, which is why it expects a SOCKS or HTTPS proxy with the -x argument, specified by -X: -X proxy_protocol Requests that nc should use the specified protocol when talking to the proxy server. ...


6

It seems that Yast is trying to use IPv6, which probably you don't have. According to documentation for openSUSE 12.2 you can turn IPv6 off in Network Settings or manually: To enable or disable IPv6 manually, edit /etc/modprobe.d/50-ipv6.conf and restart the system. It's working in browser probably because when IPv6 fails it falls back to IPv4. In ...


6

cntlm provides a solution, along with some configuration. The basic steps to follow are: Install cntlm. Edit its configuration file at /etc/cntlm.conf, the comments included makes it easy enough. Add a proxy server (or two). Specify your user name and NT domain name in the appropriate places, and remove the password entry. Start the cntlm service, eg ...


6

Wow, thanks for asking this question. I find it rare to see someone fully exploiting SSH and this question hits on a couple of areas. This is not a ProxyCommand issue. The ProxyCommand simply instructs the local ssh client to do something in preparation before trying to talk to the remote client. Yes, in our instance, we talk to another ssh session, but ...


6

Let's call the machine that has internet access hasinet and the one that doesn't noinet. If you can make an SSH connection from noinet to hasinet You can do this easily with OpenSSH's built-in SOCKS proxy. This command will set up a SOCKS proxy on noinet listening on port 1080: noinet$ ssh -D 1080 hasinet If you can only make SSH connections to noinet ...


5

They're in the $http_proxy, $https_proxy and $ftp_proxy environment variables. Also, $no_proxy contains a comma-separated list of host patterns for which no proxy is used. For example: http_proxy=http://proxy.example.com:3128/ no_proxy=localhost,127.0.0.1,*.example.com


5

I don't know if that's what you're looking for, but you can use ssh -D4545 domain.com to open a socks proxy tunnel at port 4545 to the desired machine from your computer. You can then set up that proxy in your application (say Firefox) and use a plugin to quickly engage and disengage the proxy settings (something like TorButton). There is one drawback ...


5

You'll need to install and configure an actual SOCKS server on the server, such as Dante, SS5, Delegate or Srelay.


5

This may not be the best solution, but if you use any proxy then it will have a specific host:port so the netcat solution with still work, albeit you'll have to pick apart the proxy meta-data to make sense of it. The easiest way to do this might be to use any random anonymization proxy out there and just channel all the traffic through netcat. (I.e., set ...


5

Do you know flossmanuals.net? They've got a great manual on How to Bypass Internet Censorship (also as epub and pdf for offline use -- and note the translations, among others in Farsi). Among many tools and methods, they cover SOCKS proxies. But given a VPS somewhere, the other ways they mention should be considered, too. (For example how to use ssh to ...


5

Well, SSH forwarding is a proxy server of sorts. It works by accepting the connection on one side, then making a connection on the other side, and then forwarding data between the two. You could easily do this, too. For example, with netcat: nc -l -p 1234 ⇆ ssh user@remote 'nc remote2 80' where ⇆ represents one of the ways to set up a bidirectional pipe. ...


5

ssh has no native SOCKS client support, you need to use a ProxyCommand for that, for instance with socat: ssh -o ProxyCommand='socat - SOCKS4A:myproxy:%h:%p,socksuser=nobody' user@host Or use things like tsocks or dante's socksify to transparently use SOCKS for TCP traffic. For SOCKS5 with socat 2: ssh -o ProxyCommand='socat - "SOCKS5:%h:%p|tcp:myproxy:...


5

Try to run it via ssh socks proxy: echo 'Acquire::socks::proxy "socks://localhost:3128/";' | sudo tee -a /etc/apt/apt.conf ssh -CND localhost:3128 user@remote.host in another terminal session: sudo apt-get whatever you need


5

You need the ProxyCommand, see the man page. Here's an example: Host serverB HostName serverA.com User someuser ProxyCommand ssh -q serverB -W %h:%p # -W is supported by a recent OpenSSH # or for older versions or other implementations # ProxyCommand ssh -q serverB nc %h %p This allows you to type ssh serverB and you connect to serverA which then ...


5

First, you need tun2socks (often a part of the 'badvpn' package). tun2socks sets up a virtual interface which you can route traffic through, and that traffic will get sent through the target socks proxy. Setting it up gets a little tricky as you only want to route certain traffic through the tunnel. This script should do what you want: #!/bin/bash ...


5

I assume its a Linux box, so most likely SELinux is preventing the connection as there is no policy allowing the connection. You should be able to just run # setsebool -P httpd_can_network_connect true and then restart nginx.


4

Ok, I totally forgot about -vvv :-) Here is the output: OpenSSH_5.6p1, OpenSSL 1.0.0a 1 Jun 2010 debug1: Reading configuration data /home/echox/.ssh/config debug1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Executing proxy command: exec /usr/bin/...



Only top voted, non community-wiki answers of a minimum length are eligible