Skip to content

Commit

Permalink
add trojan server
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug committed Sep 15, 2023
1 parent 61127c0 commit 8f49361
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ services:
target: /etc/v2ray/v2ray.crt
- type: bind
source: ./v2ray/key.pem
target: /etc/v2ray/v2ray.key
target: /etc/v2ray/v2ray.key

trojan:
image: trojangfw/trojan
network_mode: "host"
volumes:
- type: bind
source: ./trojan/config.json
target: /config/config.json
51 changes: 51 additions & 0 deletions docker/trojan/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 9443,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"password": [
"password1",
"password2"
],
"log_level": 1,
"ssl": {
"cert": "/etc/v2ray/v2ray.crt",
"key": "/etc/v2ray/v2ray.key",
"key_password": "",
"cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",
"cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
"prefer_server_cipher": true,
"alpn": [
"http/1.1"
],
"alpn_port_override": {
"h2": 81
},
"reuse_session": true,
"session_ticket": false,
"session_timeout": 600,
"plain_http_response": "",
"curves": "",
"dhparam": ""
},
"tcp": {
"prefer_ipv4": false,
"no_delay": true,
"keep_alive": true,
"reuse_port": false,
"fast_open": false,
"fast_open_qlen": 20
},
"mysql": {
"enabled": false,
"server_addr": "127.0.0.1",
"server_port": 3306,
"database": "trojan",
"username": "trojan",
"password": "",
"key": "",
"cert": "",
"ca": ""
}
}

0 comments on commit 8f49361

Please sign in to comment.