feat: add DC9 sing-box fallback protocols
This commit is contained in:
@@ -3,3 +3,15 @@ ACME_EMAIL=admin@example.com
|
|||||||
LISTEN_PORT=7364
|
LISTEN_PORT=7364
|
||||||
USER1_PASSWORD=change-me
|
USER1_PASSWORD=change-me
|
||||||
CLOUDFLARE_API_TOKEN=change-me
|
CLOUDFLARE_API_TOKEN=change-me
|
||||||
|
|
||||||
|
ANYTLS_DOMAIN=sb-dd65a3.kais.cloud
|
||||||
|
ANYTLS_HY2_PORT=43824
|
||||||
|
ANYTLS_PASSWORD=change-me
|
||||||
|
HY2_PASSWORD=change-me
|
||||||
|
HY2_OBFS_PASSWORD=change-me
|
||||||
|
|
||||||
|
VLESS_PORT=22590
|
||||||
|
VLESS_UUID=00000000-0000-4000-8000-000000000000
|
||||||
|
REALITY_SERVER_NAME=www.microsoft.com
|
||||||
|
REALITY_PRIVATE_KEY=change-me
|
||||||
|
REALITY_SHORT_ID=0123456789abcdef
|
||||||
|
|||||||
@@ -7,6 +7,16 @@ services:
|
|||||||
LISTEN_PORT: ${LISTEN_PORT}
|
LISTEN_PORT: ${LISTEN_PORT}
|
||||||
USER1_PASSWORD: ${USER1_PASSWORD}
|
USER1_PASSWORD: ${USER1_PASSWORD}
|
||||||
CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
|
CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
|
||||||
|
ANYTLS_DOMAIN: ${ANYTLS_DOMAIN}
|
||||||
|
ANYTLS_HY2_PORT: ${ANYTLS_HY2_PORT}
|
||||||
|
ANYTLS_PASSWORD: ${ANYTLS_PASSWORD}
|
||||||
|
HY2_PASSWORD: ${HY2_PASSWORD}
|
||||||
|
HY2_OBFS_PASSWORD: ${HY2_OBFS_PASSWORD}
|
||||||
|
VLESS_PORT: ${VLESS_PORT}
|
||||||
|
VLESS_UUID: ${VLESS_UUID}
|
||||||
|
REALITY_SERVER_NAME: ${REALITY_SERVER_NAME}
|
||||||
|
REALITY_PRIVATE_KEY: ${REALITY_PRIVATE_KEY}
|
||||||
|
REALITY_SHORT_ID: ${REALITY_SHORT_ID}
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/sing-box/config.json.template:/template/config.json.template:ro
|
- ./etc/sing-box/config.json.template:/template/config.json.template:ro
|
||||||
- sing-box-config:/output
|
- sing-box-config:/output
|
||||||
|
|||||||
@@ -28,6 +28,92 @@
|
|||||||
"multiplex": {
|
"multiplex": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "anytls",
|
||||||
|
"tag": "anytls-in",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": ${ANYTLS_HY2_PORT},
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"name": "user1",
|
||||||
|
"password": "${ANYTLS_PASSWORD}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "${ANYTLS_DOMAIN}",
|
||||||
|
"acme": {
|
||||||
|
"domain": "${ANYTLS_DOMAIN}",
|
||||||
|
"data_directory": "/var/lib/sing-box/certmagic-anytls",
|
||||||
|
"email": "${ACME_EMAIL}",
|
||||||
|
"dns01_challenge": {
|
||||||
|
"provider": "cloudflare",
|
||||||
|
"api_token": "${CLOUDFLARE_API_TOKEN}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "hysteria2",
|
||||||
|
"tag": "hysteria2-in",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": ${ANYTLS_HY2_PORT},
|
||||||
|
"obfs": {
|
||||||
|
"type": "salamander",
|
||||||
|
"password": "${HY2_OBFS_PASSWORD}"
|
||||||
|
},
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"name": "user1",
|
||||||
|
"password": "${HY2_PASSWORD}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "${ANYTLS_DOMAIN}",
|
||||||
|
"alpn": [
|
||||||
|
"h3"
|
||||||
|
],
|
||||||
|
"acme": {
|
||||||
|
"domain": "${ANYTLS_DOMAIN}",
|
||||||
|
"data_directory": "/var/lib/sing-box/certmagic-anytls",
|
||||||
|
"email": "${ACME_EMAIL}",
|
||||||
|
"dns01_challenge": {
|
||||||
|
"provider": "cloudflare",
|
||||||
|
"api_token": "${CLOUDFLARE_API_TOKEN}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vless",
|
||||||
|
"tag": "vless-reality-in",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": ${VLESS_PORT},
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"name": "user1",
|
||||||
|
"uuid": "${VLESS_UUID}",
|
||||||
|
"flow": "xtls-rprx-vision"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "${REALITY_SERVER_NAME}",
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"handshake": {
|
||||||
|
"server": "${REALITY_SERVER_NAME}",
|
||||||
|
"server_port": 443
|
||||||
|
},
|
||||||
|
"private_key": "${REALITY_PRIVATE_KEY}",
|
||||||
|
"short_id": [
|
||||||
|
"${REALITY_SHORT_ID}"
|
||||||
|
],
|
||||||
|
"max_time_difference": "2m"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbounds": [
|
"outbounds": [
|
||||||
|
|||||||
Reference in New Issue
Block a user