Skip to content

Instantly share code, notes, and snippets.

@shankerwangmiao
shankerwangmiao / 60-stream.conf
Last active September 13, 2018 04:16
nginx-transp-proxy
stream {
log_format main '$remote_addr:$remote_port => $server_addr:$server_port'
' [$time_local] $protocol $status $bytes_sent $bytes_received '
'$session_time "$ssl_preread_server_name" $will_bind_local_addr';
server {
listen 127.0.0.1:3003 transparent;
proxy_pass $real_connect_to;
proxy_bind $will_bind_local_addr;
@shankerwangmiao
shankerwangmiao / nginx-ip-transp.patch
Last active October 11, 2023 04:15
nginx-ip-transp
diff --git a/auto/unix b/auto/unix
index 43d3b25..2b229f7 100644
--- a/auto/unix
+++ b/auto/unix
@@ -312,6 +312,17 @@ ngx_feature_test="cpu_set_t mask;
. auto/feature
+ngx_feature="IP_TRANSPARENT"
+ngx_feature_name="NGX_HAVE_TRANSPARENT"
@tianyuf
tianyuf / baidu-as-a-network-utility.css
Created May 14, 2016 15:03
BaaN: Baidu as a Network Utility - 百度的实用主义方法论.
@-moz-document domain("baidu.com") {
body {
display: none;
}
html {
margin: 30px;
}
html::after {