1. Tools:
A server with public IP; Frp ; Nginx ; SwitchySharp browser plug-in;
2. Operation steps
- Configure the server with public IP:
Frps configuration: file path "frp\frps.ini"[ common ] bind_port = 7000 #Server port dashboard_addr = 0.0.0.0 #Dashboard listening address dashboard_port = 7500 #Dashboard listening port dashboard_user = admin #Dashboard access username dashboard_pwd = admin #Dashboard access password privilege_token = #Connection key
- Configure intranet server:
Frpc configuration: file path "frp\frpc.ini"[ common ] server_addr = #The public IP of the server server_port = 7000 #Server port privilege_token = #Connection key [ssh] type = tcp local_ip = 127.0.0.1 local_port = 11111 #Forward proxy local port remote_port = 5000 #Forward proxy server port, it must be ensured that the server firewall and security group have allowed this port to pass through
Nginx configuration: file path "nginx\conf\nginx.conf"
#user nobody; worker_processes 4; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { client_max_body_size 200m; server { resolver 114.114.114.114 8.8.8.8 ; listen 11111 ; #must be consistent with the ssh mapping port location / { proxy_pass http://$http_host$request_uri; } } }
2. How to use forward proxy