Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Redsocks2 automatic proxy Settings

Shulou Source: shulou.com Published: 2022-06-01 08:48:09 11月26日 Update

Redsock2 can redirect some proxy servers that do not support transparent proxies so that transparent proxies can be implemented.

Redsock2 installation is very simple. Just make is fine.

Ubuntu needs

Apt-get intsll libevent-2.0-5 libssl-dev

After the installation is complete, copy the redsocks2 directly to the relevant directory.

I used it as a gateway, and then tested it. Http and https can't go together, they have to separate.

Redsocks2 profile:

Base {log_debug = off; log_info = off; daemon = on; redirector= iptables;} redsocks {local_ip = 192.168.1.1; local_port = 1080; ip = 192.168.1.1; port = 8787; type = http-relay; timeout = 12; autoproxy = 1;} redsocks {local_ip = 192.168.1.1; local_port = 1081; ip = 192.168.1.1; port = 8787; type = http-connect; timeout = 12; autoproxy = 1 } redsocks {local_ip = 192.168.1.1; local_port = 1090; interface = eth0; type = direct; # is mainly used to solve NAT problems, so that WAN can access LAN timeout = 1; autoproxy = 0;} autoproxy {no_quick_check_seconds = 300; quick_connect_timeout = 2;} ipcache {cache_size = 4; cache_file = "/ home/user/conf/cache.ip"; stale_time = 7200; autosave_interval = 3600; port_check = 1;}

Related iptables settin

#! / bin/bashiptables-restore

Tags: Agents agent services methods functions addresses strengths effects files directories gateways software links problems support services testing configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Shulou Tech Info Docker Shulou Information