Merge c5b5d052fa479115704341036da493d121b98f21 into ff0566338be599d1652678c346a6a022cd87a5fa

This commit is contained in:
Hasan-W 2024-10-10 15:31:20 +08:00 committed by GitHub
commit 66108e7b85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 139 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{
"log": {
"loglevel": "warning"
},
"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"
}
}
}
]
}

View 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": {}
}
]
}

View 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;
}
}
}