socks

Fetching a .onion domain with requests

百般思念 提交于 2020-07-30 10:36:10
问题 I'm trying to access the following domain nzxj65x32vh2fkhk.onion using requests. I have tor running and I configured the session's object proxies correctly. import requests session = requests.session() session.proxies = {'http': 'socks5://localhost:9050', 'https': 'socks5://localhost:9050'} print(session.get('http://httpbin.org/ip').text) # prints {"origin": "67.205.146.164" } print(requests.get('http://httpbin.org/ip').text) # prints {"origin": "5.102.254.76" } However when I try to access

How to set nonProxyHosts for a SOCKS proxy

别说谁变了你拦得住时间么 提交于 2020-06-09 11:59:32
问题 I want to set the nonProxyHosts list for a SOCKS5 proxy, i.e. the list of hostnames to which a direct connection should be used. As the oracle docs describe, there are options named http.nonProxyHosts and ftp.nonProxyHosts to set proxy exclusions for HTTP and FTP, but there is no specific setting for SOCKS proxies. I tried http.nonProxyHosts , but this doesn't affect SOCKS connections. The SOCKS proxy is set up via: System.setProperty("socksProxyHost", "192.168.10.10"); System.setProperty(

http,socks4,socks5代理的区别

拟墨画扇 提交于 2020-04-14 16:25:51
【推荐阅读】微服务还能火多久?>>> HTTP代理:能够代理客户机的HTTP访问,主要是代理浏览器访问网页,它的端口一般为80、8080、3128等; SOCKS代理:SOCKS代理与其他类型的代理不同,它只是简单地传递数据包,而并不关心是何种应用协议,既可以是HTTP请求,所以SOCKS代理服务器比其他类型的代理服务器速度要快得多。SOCKS代理又分为SOCKS4和SOCKS5,二者不同的是SOCKS4代理只支持TCP协议(即传输控制协议),而SOCKS5代理则既支持TCP协议又支持UDP协议(即用户数据包协议),还支持各种身份验证机制、服务器端域名解析等。SOCK4能做到的SOCKS5都可得到,但SOCKS5能够做到的SOCK4则不一定能做到,比如我们常用的聊天工具QQ在使用代理时就要求用SOCKS5代理,因为它需要使用UDP协议来传输数据 来源: oschina 链接: https://my.oschina.net/u/103999/blog/127279

Java SOCKS proxy

五迷三道 提交于 2020-01-24 09:25:09
问题 Does the socksProxyHost property require an IP address? System.setProperty("socksProxyHost", preferences.getProxyHost() ); Setting it like above, if I provide 127.0.0.1, I get connected to the proxy on my localhost. But if I provide localhost, it does not connect it. I have no other machines on the LAN I can use to this. So does anyone know if it works with hosts names or do I have to resolve the host and pass in an IP? 回答1: System properties are just a dumb map. There are no observers to be

How To Authenticate Socks 5 Proxies Inside PAC (Proxy Auto Config) Files

懵懂的女人 提交于 2020-01-22 20:13:08
问题 How can you setup PAC files to use SOCKS proxies with authentication? Using this simple PAC file as an example: function FindProxyForURL(url, host) { return "SOCKS 69.123.133.75:7257;"; } How would you connect to that socks proxy using a username and password? 回答1: Since firefox and msie do not support socks 5 authentication, it is impossible to specify the username and password in a PAC file without first modifying your browser of choice. 回答2: You need to open ssh tunnel to your destination

Connection Reset by Peer Java Exception

北城以北 提交于 2020-01-21 09:43:51
问题 URL uri = null; try { uri = new URL(aURL); } catch (MalformedURLException e) { // TODO Auto-generated catch block Log.e("My SOCKET CONNECTION ERROR 1-->>", e.toString()); e.printStackTrace(); } InetSocketAddress sa = InetSocketAddress.createUnresolved("XXX.XXX.X.XXX", 1080); Proxy proxy = new Proxy(Proxy.Type.SOCKS, sa); try { HttpURLConnection conn = (HttpURLConnection) uri.openConnection(proxy); conn.connect(); } catch (IOException e) { // TODO Auto-generated catch block Log.e("My SOCKET

Connection Reset by Peer Java Exception

不羁岁月 提交于 2020-01-21 09:43:21
问题 URL uri = null; try { uri = new URL(aURL); } catch (MalformedURLException e) { // TODO Auto-generated catch block Log.e("My SOCKET CONNECTION ERROR 1-->>", e.toString()); e.printStackTrace(); } InetSocketAddress sa = InetSocketAddress.createUnresolved("XXX.XXX.X.XXX", 1080); Proxy proxy = new Proxy(Proxy.Type.SOCKS, sa); try { HttpURLConnection conn = (HttpURLConnection) uri.openConnection(proxy); conn.connect(); } catch (IOException e) { // TODO Auto-generated catch block Log.e("My SOCKET

can't connect to *.onion sites with python (<urlopen error [Errno 11001] getaddrinfo failed>)

你。 提交于 2020-01-14 13:58:14
问题 I'm trying to access *.onion sites using python. Didn't success yet, though. I've read a lot of stackoverflow questions&answers, tried a lot of different ways of resolving this problem: I tried using Python 2.7 and Python 3.5 , tried using urllib , urllib2 , requests (then I found out requests doesn't work with socks), pysocks , etc, but nothing seems to work. Right now I'm at the point where I only get the following Error: > <urlopen error [Errno 11001] getaddrinfo failed> No, I don't have a

Creating a go socks5 client

夙愿已清 提交于 2020-01-12 19:29:06
问题 So I'm looking at the net/proxy docs and there is no examples at all of how to use any of its methods. I'm looking into using socks5. This is the how the function looks: func SOCKS5(network, addr string, auth *Auth, forward Dialer) (Dialer, error) Now everything kinda makes sense except I'm confused about forward which is a type Dialer and the function itself returns a Dialer . Everything else makes sense network, add, auth just forward is throwing me off. How would I set my client up to use

Creating a go socks5 client

别来无恙 提交于 2020-01-12 19:28:06
问题 So I'm looking at the net/proxy docs and there is no examples at all of how to use any of its methods. I'm looking into using socks5. This is the how the function looks: func SOCKS5(network, addr string, auth *Auth, forward Dialer) (Dialer, error) Now everything kinda makes sense except I'm confused about forward which is a type Dialer and the function itself returns a Dialer . Everything else makes sense network, add, auth just forward is throwing me off. How would I set my client up to use