From 5aa8c403aef7498f9572a9a1ac67c7ca78ae68f6 Mon Sep 17 00:00:00 2001 From: homemade Date: Wed, 17 Jan 2024 23:10:55 +0800 Subject: [PATCH] Enhanced: sing-box client --- out/sing-box-client/config.json | 31 +++++++++++++++++++ out/sing-box-client/docker-compose.yaml | 11 +++++++ out/sing-box-client/out | 6 ++++ {trojan/server => out/trojan-server}/.env | 0 .../server => out/trojan-server}/config.json | 0 .../trojan-server}/docker-compose.yaml | 0 trojan/client/config.json | 2 +- 7 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 out/sing-box-client/config.json create mode 100644 out/sing-box-client/docker-compose.yaml create mode 100755 out/sing-box-client/out rename {trojan/server => out/trojan-server}/.env (100%) rename {trojan/server => out/trojan-server}/config.json (100%) rename {trojan/server => out/trojan-server}/docker-compose.yaml (100%) diff --git a/out/sing-box-client/config.json b/out/sing-box-client/config.json new file mode 100644 index 0000000..c280a57 --- /dev/null +++ b/out/sing-box-client/config.json @@ -0,0 +1,31 @@ + +{ + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": 3446 + } + ], + "outbounds": [ + { + "type": "trojan", + "server": "out.homemade.net.cn", + "server_port": 6443, + "password": "J/f6m2X8-q4P", + "tls": { + "enabled": true, + "server_name": "out.homemade.net.cn", + "insecure": true, + "utls": { + "enabled": true, + "fingerprint": "chrome" + } + }, + "multiplex": { + "enabled": false + } + } + ] +} + diff --git a/out/sing-box-client/docker-compose.yaml b/out/sing-box-client/docker-compose.yaml new file mode 100644 index 0000000..b6ae0b0 --- /dev/null +++ b/out/sing-box-client/docker-compose.yaml @@ -0,0 +1,11 @@ +version: "3.8" +services: + sing-box: + image: ghcr.io/sagernet/sing-box + container_name: sing-box + restart: unless-stopped + volumes: + - ./config.json:/etc/sing-box/config.json + network_mode: "host" + command: -D /var/lib/sing-box -C /etc/sing-box/ run + diff --git a/out/sing-box-client/out b/out/sing-box-client/out new file mode 100755 index 0000000..b041eaa --- /dev/null +++ b/out/sing-box-client/out @@ -0,0 +1,6 @@ +#!/bin/bash + + +export https_proxy=http://127.0.0.1:3446 +export http_proxy=http://127.0.0.1:3446 +export all_proxy=socks5://127.0.0.1:3446 diff --git a/trojan/server/.env b/out/trojan-server/.env similarity index 100% rename from trojan/server/.env rename to out/trojan-server/.env diff --git a/trojan/server/config.json b/out/trojan-server/config.json similarity index 100% rename from trojan/server/config.json rename to out/trojan-server/config.json diff --git a/trojan/server/docker-compose.yaml b/out/trojan-server/docker-compose.yaml similarity index 100% rename from trojan/server/docker-compose.yaml rename to out/trojan-server/docker-compose.yaml diff --git a/trojan/client/config.json b/trojan/client/config.json index 44c1fe6..8f8dcb7 100644 --- a/trojan/client/config.json +++ b/trojan/client/config.json @@ -1,6 +1,6 @@ { "run_type": "client", - "local_addr": "0.0.0.0", + "local_addr": "127.0.0.1", "local_port": 1081, "remote_addr": "out.homemade.net.cn", "remote_port": 6443,