Working principle of sock5 proxy

Source: Internet
Author: User
Tags in domain

Working principle of sock5 proxy
Source: darkness fallen
Time: Wed, 26 Apr 2006 11:42:15 + 0000
Author: hjma
Http://hjma.scgy.org/blog/bo-blog/read.php? 3

Content:
The working program of the sock5 proxy is:

1. The proxy must send a request to the server.

2. Response from Agent

3. The proxy needs to send the destination IP address and port to the proxy after receiving a response

4. Proxy and target connection

5. The agent will send the information sent by the agent to the target party and send the information sent by the target party to the agent. Agent complete

Because information on the internet is transmitted over TCP or UDP, you can use the SOCKS5 proxy to do everything you can on the Internet. It is safe and convenient to find your IP address.

Sock5 supports UDP and TCP, but the two proxies are different.

How to Use the Proxy TCP protocol

1. Establish a TCP connection to port 1080 of the server.

2. Send 05 01 00 to the server (this is a hexadecimal code, the same as below)

3. If the port is 05 00, the proxy can be used.

4. Send 05 01 00 01 + Destination Address (4 bytes) + Destination Port (2 bytes). The destination address and port are both hexadecimal codes (not strings ).
Example 20 2.103.190.27-7201
The sent message is: 05 01 00 01 CA 67 be 1B 1C 21
(CA = 202 67 = 103 be = 190 1B = 27 1c21 = 7201)

5. The connection is completed by accepting the address and port returned by the server.

6. Subsequent operations and direct TCP connections are the same as those of the target party.

How to use proxy UDP connection

1. Establish a TCP connection to port 1080 of the server

2. Send 05 01 00 to the server

3. If the port is 05 00, the proxy can be used.

4. Send 05 03 00 01 00 00 00 00 + local UDP port (2 bytes)

5. The server returns 05 00 00 01 + server address + Port

7. the requester needs to send
00 00 00 01 + Destination IP address (4 bytes) + Destination Port + information to be sent

8. When a datagram is returned
Send 00 00 00 01 + Source IP address (4 bytes) + Source Port + accepted information to the agent

Note: This is a proxy protocol that does not require a password. It is only part of SOCKS5. For the complete protocol, see rfc1928.

Attached Foxmail connection test data:
TCP data without a sock5 Proxy:
Client Server
SYN
Acksyn
ACK
+ OK X1 NT-POP3 server iflytek.com (IMail 8.15 230122-9 )..
User hjma ..
+ OK send your password ..
Pass xxxxxxx ..
+ OK maildrop locked and ready ..
Stat ..
+ OK 0 0 ..
Quit ..
+ OK POP3 server saying good-bye ..
Ackfin
ACK
Ackfin
ACK

TCP data when using the sock5 Proxy:
Client sock5 Server
SYN
Acksyn
ACK
05 01 00 00 00 00
05 00 00 00 00 00
05 01 00 03 0e 31 39 32 2E 31 36 38 2E 37 35 2E 31 31 34 00 6e (... 192.168.75.114.n)
05 00 00 01 C0 A8 4D 56 08 D4
ACK
+ OK X1 NT-POP3 server iflytek.com (IMail 8.15 228888-9 )..
User hjma ..
+ OK send your password ..
Pass xxxxxxx ..
+ OK maildrop locked and ready ..
Stat ..
+ OK 0 0 ..
Quit ..
+ OK POP3 server saying good-bye ..
Ackfin
ACK
Ackfin
ACK

Generated by Bo-blog 2.0.1 SP1

 

(2) The TOR is too powerful. The proxy IP address is automatically changed once in a few minutes. The proxies are both SOCKS5 proxies, and the anonymity is the highest level, there are several foreign spaces that are quite strict with the proxy, which are easily won by even the ToR, such as 100 webspace and unlimitedmb. With this, I dare say that you no longer need to look for a proxy in the future. :) In the spirit of sharing, I decided to contribute this good stuff ~~

Let's take a look at Tor's instructions.

Tor package instructions

This package can be run in 98/ME/2000/XP

1. What is a Tor?

Tor's full name is "The Onion Router" claim to be "an anonymous Internet communicaton System", home page in: http://tor.eff.org.

It is designed for a large number of existing tools, such as traffic filtering and sniffing analysis. Based on software such as Jap, it supports SOCKS5 and dynamic proxy chains (when an address is accessed through a Tor, the selected nodes are randomly selected and dynamically changed in the TOR node group. Due to both speed and security, the number of nodes is usually 2-5), it is difficult to track and effectively ensure security. On the other hand, the distributed server of Tor can be automatically obtained, saving the effort of searching for proxy servers. Not only can the tor be used for Web browsing, but most network applications can use it for transparent socks proxy.

2. Tor + Privoxy + sockscap Combination Package

The TOR configuration is complicated, but with the Toolkit made by this expert, everything becomes easier. Next we will explain in detail how to use the TOR toolkit.

1) first download and decompress the TOR toolkit and decompress it to generate the current directory soft_tor

2) Go To The soft_tor directory and click "run first" in the BAT file. Three software, namely, tro + Privoxy + sockscap, will be started at the same time, so we will see: A dark tor window, a Privoxy icon on the system bar, and a sockscap window. This well-known sockscap must be known to all and can implement the socks proxy function we are most difficult to find.

3) when you run the TOR package for the first time, you need to find the node data. It may take less than half a minute (depending on the network speed). When you see that the TOR window displays "Tor has successfully opened a circuit. looks like client functionality is working. you can start IE free surfing from the sockscap window. The accessed content is encrypted by Tor. (Note: You must start IE from sockscap. If you open ie directly from the desktop, it is connected directly)

For example, if our lovely Google cannot be accessed in China, open it with a Tor. No matter what you search for, there will be no "This page cannot be displayed", and Tor supports HTTPS, in this way, you no longer have to worry about the failure to log on to your Gmail many times.

4) "Update APNIC file. Bat" is used to download the IP address distribution table, which runs once every several days to avoid all domestic tor nodes. After running the package combination, double-click the "open URL" BAT file to automatically open the corresponding URL, you can download some good green gadgets on it.

5) If you have a firewall, Run "run. after bat, the tor.exe privoxy.exe program will have a network connection request ----- please allow; Run "Update APNIC file. after bat, the curl.exe program will have a network request ----- please allow.

5) if an error occurs in the registry or the import fails, the sockscap setting interface is displayed. You can enter 127.0.0.1 In the SOCKS Server column, set port to 9050, and select: "socks version 5", select "All Domain Names resolved by the remote end" in domain name resolution to use.

3. the anonymity of tor

The anonymity of Tor is the best I have ever seen. You can test it on some agent anonymous testing websites, such as starting IE in sockscap and opening the famous agent Website: http://www.cybersyndrome.net/evc.html. check the samples and the test result is definitely anonymous.
()". What's even more valuable is whether tor also has the high-strength encryption function SOCKS5 proxy, which can achieve more functions ...... Check whether it is exciting. Try it now. Tor will never disappoint you :)

Download link: http://user.ftth100.com/yjbch/bt/tor.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.