HTTP協議屬於應用層,而SOCKS協議屬於傳輸層
SOCKS代理
SOCKS代理能在任何端口,任何協議下運行。
SOCKS V4只支持 TCP連接,而SOCKS V5在其基礎上增加了安全認證以及對UDP協議的支持(SOCKS5支持密碼認證以及
轉發UDP流量,注意,HTTP是不支持轉發UDP的)。SOCKS代理在任何情況下都不會中斷server與client之間的數據(非明
文傳輸決定的,但是在SOCKS代理服務器上還是可以還原出TCP和UDP的原始流量的)
HTTP代理
HTTP代理可以中斷連接(即在中間截斷數據流),因為HTTP代理是以HTTP請求為基礎的, 而這些請求以明文形式存在,所
以HTTP代理可以在Client和Service中間竊聽,修改數據。
SOCKS Protocol Version 5
The protocol described here is designed to provide a framework for
client-server applications in both the TCP and UDP domains to
conveniently and securely use the services of a network firewall.
The protocol is conceptually a "shim-layer" between the application
layer and the transport layer, and as such does not provide network-
layer gateway services, such as forwarding of ICMP messages.
七層:物理層、鏈路層、網絡層、傳輸層、會話層、表示層、應用層
五層:物理層、鏈路層、網絡層、傳輸層、 應用層
阮一峰:互聯網協議入門