diff --git a/.infisical.json b/.infisical.json new file mode 100644 index 0000000..c95201d --- /dev/null +++ b/.infisical.json @@ -0,0 +1,5 @@ +{ + "workspaceId": "35739780-b931-4e23-b374-9827f988d345", + "defaultEnvironment": "dev", + "gitBranchToEnvironmentMapping": null +} diff --git a/docker-compose.yaml b/docker-compose.yaml index a651347..9fe9f02 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,3 +16,8 @@ services: INFISICAL_MACHINE_CLIENT_SECRET: ${INFISICAL_MACHINE_CLIENT_SECRET} ports: - 443:443 + + warp: + image: ghcr.io/aleskxyz/warp-svc:v1.5.0 + restart: always + container_name: warp diff --git a/templates/sing-box-reality-server/sing-box-reality-server.json b/templates/sing-box-reality-server/sing-box-reality-server.json index 9effee7..fc30cf6 100644 --- a/templates/sing-box-reality-server/sing-box-reality-server.json +++ b/templates/sing-box-reality-server/sing-box-reality-server.json @@ -5,6 +5,10 @@ }, "dns": { "servers": [ + { + "tag": "dns:local", + "type": "local" + }, { "tag": "dns:cloudflare", "type": "h3", @@ -17,7 +21,12 @@ "enabled": true, "server": "pool.ntp.org", "server_port": 123, - "interval": "60m" + "interval": "60m", + "domain_resolver": { + "server": "dns:cloudflare", + "strategy": "ipv4_only", + "disable_cache": false + } }, "inbounds": [ { @@ -27,7 +36,13 @@ "listen_port": 443, "users": [ { - "uuid": "${UUID}", + "name": "direct", + "uuid": "${DIRECT_UUID}", + "flow": "xtls-rprx-vision" + }, + { + "name": "warp", + "uuid": "${WARP_UUID}", "flow": "xtls-rprx-vision" } ], @@ -59,8 +74,52 @@ ], "outbounds": [ { - "type": "direct", - "tag": "out:direct" + "tag": "out:direct", + "type": "direct" + }, + { + "tag": "out:warp", + "type": "socks", + "server": "warp", + "server_port": 1080, + "version": "5", + "domain_resolver": { + "server": "dns:local", + "strategy": "ipv4_only", + "disable_cache": true + } } - ] + ], + "route": { + "rules": [ + { + "ip_is_private": true, + "outbound": [ + "out:direct", + "out:warp" + ], + "action": "reject" + }, + { + "inbound": [ + "in:vless" + ], + "auth_user": "direct", + "action": "route", + "outbound": "out:direct" + }, + { + "inbound": [ + "in:vless" + ], + "auth_user": "warp", + "action": "route", + "outbound": "out:warp" + } + ], + "default_domain_resolver": { + "server": "dns:cloudflare" + }, + "final": "out:warp" + } }