chika0801 / sing-box-examples

sing-box 配置示例
https://github.com/SagerNet/sing-box
1.76k stars 292 forks source link

could you add examples trojan websocket along with trojan tcp tls? #1

Closed malikshi closed 1 year ago

chika0801 commented 1 year ago

nginx config https://github.com/chika0801/sing-box-install/blob/main/VMess-WebSocket-TLS/nginx.conf

sing-box config

```console { "inbounds": [ { "type": "trojan", "listen": "127.0.0.1", "listen_port": 8001, "sniff": true, "sniff_override_destination": true, "users": [ { "password": "chika" } ], "transport": { "type": "ws", "path": "/lovelive", "early_data_header_name": "Sec-WebSocket-Protocol" } } ] } ```
isaac574 commented 1 year ago

大佬您好,能否将TROJAN和HYSTERIA 这2个协议的配置文件CONFIG.JSON写在一块儿? 谢了。

chika0801 commented 1 year ago

大佬您好,能否将TROJAN和HYSTERIA 这2个协议的配置文件CONFIG.JSON写在一块儿? 谢了。

{
    "inbounds": [
        {
            "type": "hysteria",
            "listen": "::",
            "listen_port": 16384,
            "up_mbps": 1000,
            "down_mbps": 1000,
            "auth_str": "chika",
            "tls": {
                "enabled": true,
                "alpn": [
                    "h3"
                ],
                "certificate_path": "/root/fullchain.cer",
                "key_path": "/root/private.key"
            }
        },
        {
            "type": "trojan",
            "listen": "::",
            "listen_port": 16386,
            "users": [
                {
                    "password": "chika"
                }
            ],
            "tls": {
                "enabled": true,
                "certificate_path": "/root/fullchain.cer",
                "key_path": "/root/private.key"
            }
        }
    ]
}
chika0801 commented 1 year ago

No description provided.

https://github.com/chika0801/sing-box-examples/tree/main/VMess