File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -50,3 +50,19 @@ http {
50
50
51
51
include vhost/*.conf;
52
52
}
53
+
54
+ stream {
55
+ log_format tcp_proxy '$remote_addr [$time_local ] '
56
+ '$protocol $status $bytes_sent $bytes_received '
57
+ '$session_time "$upstream_addr " '
58
+ '"$upstream_bytes_sent " "$upstream_bytes_received " "$upstream_connect_time "' ;
59
+
60
+ access_log logs/tcp-access.log tcp_proxy;
61
+
62
+ server {
63
+ listen 9128 ;
64
+ proxy_connect_timeout 1s ;
65
+ proxy_timeout 3s;
66
+ proxy_pass 127.0.0.1:3128;
67
+ }
68
+ }
Original file line number Diff line number Diff line change 8
8
9
9
location / {
10
10
access_by_lua_file 'lua/router.lua';
11
- proxy_set_header Host $host:$server_port;
12
11
proxy_set_header X-Real-IP $remote_addr;
13
12
proxy_set_header X-Real-PORT $remote_port;
14
13
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
You can’t perform that action at this time.
0 commit comments