Skip to content

Commit cb91a9e

Browse files
improve nginx conf and add tcp proxy
1 parent cd864d3 commit cb91a9e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

c/proxy/conf/nginx.conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,19 @@ http {
5050

5151
include vhost/*.conf;
5252
}
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+
}

c/proxy/conf/vhost/coordination_http_proxy.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ server {
88

99
location / {
1010
access_by_lua_file 'lua/router.lua';
11-
proxy_set_header Host $host:$server_port;
1211
proxy_set_header X-Real-IP $remote_addr;
1312
proxy_set_header X-Real-PORT $remote_port;
1413
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)