# Big direction 1. pure python socket proxy service, one py file 2. ufw allow port 3. use proxy_switch extension in broswer 4. "ssh -L 141:127.0.0.1:141 root@5.3.7.5", connect local 141 as remote 141 # Python script ``` """ Small Socks5 Proxy Server in Python from https://github.com/MisterDaneel/ Modified by yingshaoxo """ # Network import socket import select from struct import pack, unpack # System import traceback from threading import Thread, activeCount from signal import signal, SIGINT, SIGTERM from time import sleep import sys from multiprocessing import Process # # Configuration # MAX_THREADS = 200 BUFSIZE = 2048 TIMEOUT_SOCKET = 5 LOCAL_ADDR = '0.0.0.0' LOCAL_PORT = 2121 # Parameter to bind a socket to a device, using SO_BINDTODEVICE # Only root can set this option # If the name is an empty string or None, the interface is chosen when # a routing decision is made # OUTGOING_INTERFACE = "eth0" OUTGOING_INTERFACE = "