mirror of
https://github.com/v2fly/v2ray-examples.git
synced 2025-04-02 00:59:29 +08:00
update new json Socks5-WS-Web-TLS-Nginx
This commit is contained in:
parent
bb88b999c1
commit
9f08273a5b
40
Socks5-WS-Web-TLS-Nginx/config_client.json
Normal file
40
Socks5-WS-Web-TLS-Nginx/config_client.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
|
||||
"inbounds": [
|
||||
{
|
||||
"port": 1080,
|
||||
"protocol": "socks",
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "你的域名",
|
||||
"port": 443
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "tls",
|
||||
"wsSettings": {
|
||||
"path": "/comebey"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
36
Socks5-WS-Web-TLS-Nginx/config_server.json
Normal file
36
Socks5-WS-Web-TLS-Nginx/config_server.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"port": "1080",
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "socks",
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"userLevel": 10
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/comebey"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"settings": {}
|
||||
}
|
||||
]
|
||||
}
|
61
Socks5-WS-Web-TLS-Nginx/nginx.conf
Normal file
61
Socks5-WS-Web-TLS-Nginx/nginx.conf
Normal file
@ -0,0 +1,61 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
include /usr/share/nginx/modules/*.conf;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name 域名;
|
||||
rewrite ^/(.*) https://域名$1 permanent;
|
||||
}
|
||||
|
||||
server #关键代码
|
||||
{
|
||||
# SSL configuration
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
ssl_certificate /路径/*.pem; #你的ssl证书*.crt 或者 *.pem
|
||||
ssl_certificate_key /路径/*.key; #你的ssl key
|
||||
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!MD5; #套件RSA和ecc不一样在下面我会分别给出
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; #套件
|
||||
root /usr/share/nginx/html; #网页路径,这里也可以放你们自己的html网站替换下就可以了
|
||||
server_name 域名; #你的服务器域名
|
||||
|
||||
location /comebey {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://127.0.0.1:1080; #此IP地址和端口需要和socks服务器端配置保持一致,
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user