Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from lxhao61:main #2

Merged
merged 76 commits into from
Aug 25, 2021
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ec06719
Update Caddyfile
lxhao61 Aug 24, 2021
004d2f3
Update caddy.json
lxhao61 Aug 24, 2021
ec8b9e1
Update nginx.conf
lxhao61 Aug 24, 2021
5c78548
Update 1_nginx.conf
lxhao61 Aug 24, 2021
2b5dc33
Update 2_nginx.conf
lxhao61 Aug 24, 2021
b3383ba
Update 1_naive_Caddyfile
lxhao61 Aug 24, 2021
60aa824
Update 1_naive_caddy.json
lxhao61 Aug 24, 2021
84a21ee
Update 2_naive_Caddyfile
lxhao61 Aug 24, 2021
bd3ef95
Update 2_naive_caddy.json
lxhao61 Aug 24, 2021
ee9b6cc
Update 1_Caddyfile
lxhao61 Aug 24, 2021
2efe039
Update 1_caddy.json
lxhao61 Aug 24, 2021
812fefa
Update 2_Caddyfile
lxhao61 Aug 24, 2021
7989521
Update 2_caddy.json
lxhao61 Aug 24, 2021
d426c09
Update 1_nginx.conf
lxhao61 Aug 24, 2021
8a33592
Update 1_nginx.conf
lxhao61 Aug 24, 2021
5e6aece
Update 1_nginx.conf
lxhao61 Aug 24, 2021
68f89bb
Update 2_nginx.conf
lxhao61 Aug 24, 2021
6499466
Update README.md
lxhao61 Aug 24, 2021
13f9cda
Update README.md
lxhao61 Aug 24, 2021
6ff9047
Update README.md
lxhao61 Aug 24, 2021
dddd467
Delete v2ray(B+C+A)+nginx directory
lxhao61 Aug 24, 2021
1b6287e
Update README.md
lxhao61 Aug 24, 2021
d358380
Update 1_nginx.conf
lxhao61 Aug 25, 2021
b483bcf
Update 2_nginx.conf
lxhao61 Aug 25, 2021
fb2756b
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
19d1260
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
48a38ed
Update 1_nginx.conf
lxhao61 Aug 25, 2021
93f5b17
Update 2_nginx.conf
lxhao61 Aug 25, 2021
b3ea5f9
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
fac6098
Update nginx.conf
lxhao61 Aug 25, 2021
0d27e8b
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
dadad23
Update nginx.conf
lxhao61 Aug 25, 2021
8742f60
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
c877464
Update 1_nginx.conf
lxhao61 Aug 25, 2021
20944bf
Update 2_nginx.conf
lxhao61 Aug 25, 2021
0d5731a
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
55de5d7
Update 1_nginx.conf
lxhao61 Aug 25, 2021
7ef3921
Update 2_nginx.conf
lxhao61 Aug 25, 2021
caa34c6
Update 3_nginx.conf
lxhao61 Aug 25, 2021
347569f
Update 1_nginx.conf
lxhao61 Aug 25, 2021
2237ed4
Update 2_nginx.conf
lxhao61 Aug 25, 2021
8840d19
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
e11bbfa
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
2f868dc
Update 1_nginx.conf
lxhao61 Aug 25, 2021
60d1785
Update 2_nginx.conf
lxhao61 Aug 25, 2021
49eb25d
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
6beab4a
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
b63ce1a
Update 1_nginx.conf
lxhao61 Aug 25, 2021
27801a5
Update 2_nginx.conf
lxhao61 Aug 25, 2021
c2da3e0
Update 3_nginx.conf
lxhao61 Aug 25, 2021
978ad91
Update 1_nginx.conf
lxhao61 Aug 25, 2021
9d11f88
Update 2_nginx.conf
lxhao61 Aug 25, 2021
eaf4cb8
Update 3_nginx.conf
lxhao61 Aug 25, 2021
f8fd15f
Update 1_nginx.conf
lxhao61 Aug 25, 2021
25daeb9
Update 2_nginx.conf
lxhao61 Aug 25, 2021
5fb3e7c
Update 3_nginx.conf
lxhao61 Aug 25, 2021
cdc5b52
Update 1_nginx.conf
lxhao61 Aug 25, 2021
59aba6e
Update 2_nginx.conf
lxhao61 Aug 25, 2021
8d12870
Update 3_nginx.conf
lxhao61 Aug 25, 2021
e291fa6
Update 1_nginx.conf
lxhao61 Aug 25, 2021
578c82e
Update 2_nginx.conf
lxhao61 Aug 25, 2021
465e031
Update 3_nginx.conf
lxhao61 Aug 25, 2021
951b60e
Update 1_nginx.conf
lxhao61 Aug 25, 2021
ed0e772
Update 2_nginx.conf
lxhao61 Aug 25, 2021
48e4762
Update 3_nginx.conf
lxhao61 Aug 25, 2021
ae1f6db
Update 1_nginx.conf
lxhao61 Aug 25, 2021
47e7aca
Update 2_nginx.conf
lxhao61 Aug 25, 2021
1cca5e9
Update 1_nginx.conf
lxhao61 Aug 25, 2021
e9ad47b
Update 2_nginx.conf
lxhao61 Aug 25, 2021
b7cc008
Update 3_nginx.conf
lxhao61 Aug 25, 2021
cb3bb6b
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
311e498
Update 1_nginx.conf
lxhao61 Aug 25, 2021
537e81e
Update 2_nginx.conf
lxhao61 Aug 25, 2021
095db82
Update 3_nginx.conf
lxhao61 Aug 25, 2021
e13d083
Update CDN_nginx.conf
lxhao61 Aug 25, 2021
efbdbed
Update nginx.conf
lxhao61 Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 2_nginx.conf
  • Loading branch information
lxhao61 committed Aug 24, 2021
commit 68f89bb4527a6752255346ac055394c749c51ae5
80 changes: 8 additions & 72 deletions v2ray(B+C+G+A)+nginx/2_nginx.conf
Original file line number Diff line number Diff line change
@@ -1,51 +1,6 @@

user root;
worker_processes auto;

error_log /var/log/nginx/error.log;

pid /run/nginx.pid;

events {
worker_connections 1024;
}

stream {
map $ssl_preread_server_name $backend_name {
z1.xx.yy http1; #z1.xx.yy更改为自己规划对应http/1.1 server的域名
z2.xx.yy http2; #z2.xx.yy更改为自己规划对应http/2 server的域名
}

upstream http1 {
server unix:/dev/shm/http1.sock; #转给http/1.1 server监听进程
}

upstream http2 {
server unix:/dev/shm/http2.sock; #转给http/2 server监听进程
}

server {
listen 443; #IPv4,tcp 443监听端口。
listen [::]:443; #IPv6,tcp 443监听端口。无IPv6,此项可以删除。
ssl_preread on;
proxy_protocol on; #启用PROXY protocol发送
proxy_pass $backend_name;
}
}

#在‘http{}’里面添加(或修改)如下两个‘server’配置:
http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$proxy_protocol_addr:$proxy_protocol_port';

access_log /var/log/nginx/access.log main;

sendfile on;
keepalive_timeout 65;
#.........<省略>........

server {
listen 80; #IPv4,http默认监听端口。
Expand All @@ -54,12 +9,12 @@ http {
}

server {
listen unix:/dev/shm/http1.sock ssl proxy_protocol; #http/1.1 server监听进程,并启用PROXY protocol接收
set_real_ip_from unix:;
server_name z2.xx.yy; #限定域名访问(禁止以ip方式访问网站),更改为自己的对应域名。
listen 443 ssl http2; #IPv4,https默认监听端口,且启用支持http/2
listen [::]:443 ssl http2; #IPv6,https默认监听端口,且启用支持http/2。无IPv6,此项可以删除。
server_name xx.yy; #更改为自己的域名

ssl_certificate /home/tls/wildcard_.xx.yy/wildcard_.xx.yy.crt; #换成自己的通配符证书或SAN证书,绝对路径。
ssl_certificate_key /home/tls/wildcard_.xx.yy/wildcard_.xx.yy.key; #换成自己的通配符密钥或SAN密钥,绝对路径。
ssl_certificate /home/tls/xx.yy/xx.yy.crt; #换成自己的证书,绝对路径。
ssl_certificate_key /home/tls/xx.yy/xx.yy.key; #换成自己的密钥,绝对路径。

ssl_protocols TLSv1.2 TLSv1.3; #TLSv1.3可能需要源码编译才支持,见此部分README.md说明。
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305;
Expand All @@ -76,7 +31,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location = /ss1v2ray { #与Xray-plugin或v2ray-plugin模块中path对应
location = /SS1v2ray { #与Xray-plugin或v2ray-plugin模块中path对应
proxy_redirect off;
proxy_pass http:https://127.0.0.1:2002; #转发给本机Xray-plugin或v2ray-plugin监听端口
proxy_http_version 1.1;
Expand All @@ -87,25 +42,6 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; #启用HSTS
location / {
root /var/www/html/; #更改为自己存放的web文件路径
index index.html index.htm;
}
}

server {
listen unix:/dev/shm/http2.sock ssl http2 proxy_protocol; #http/2 server监听进程,并启用PROXY protocol接收。
set_real_ip_from unix:;
server_name z2.xx.yy; #限定域名访问(禁止以ip方式访问网站),更改为自己的对应域名。

ssl_certificate /home/tls/wildcard_.xx.yy/wildcard_.xx.yy.crt; #换成自己的通配符证书或SAN证书,绝对路径。
ssl_certificate_key /home/tls/wildcard_.xx.yy/wildcard_.xx.yy.key; #换成自己的通配符密钥或SAN密钥,绝对路径。

ssl_protocols TLSv1.2 TLSv1.3; #TLSv1.3可能需要源码编译才支持,见此部分README.md说明。
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers on;

location /cdngrpc { #与vless+grpc应用中serviceName对应
grpc_pass grpc:https://unix:/dev/shm/vgrpc.sock; #转发给本机vless+grpc监听进程
}
Expand Down