cty123 / TrojanRust

Trojan-rust is a rust implementation for Trojan protocol that is targeted to circumvent GFW. This implementation focus on performance and stability above everything else.
MIT License
112 stars 24 forks source link

小白问题,怎么作为client使用? #21

Open locustbaby opened 1 year ago

locustbaby commented 1 year ago

好奇使用这个的正确姿势是啥?比如服务商提供了trojan配置,对应这个的配置需要怎么配置? 可以使用这个的client模式直接连 服务商的trojan服务吗

ArcCal commented 1 year ago

当然可以

locustbaby commented 1 year ago

当然可以


{
  "run_type": "client",
  "local_addr": "127.0.0.1",
  "local_port": 1080,
  "remote_addr": "trojan.server.com",
  "remote_port": 443,
  "password": ["********"],
  "log_level": 1,
  "ssl": {
    "verify": true,
    "verify_hostname": true,
    "cert": "",
    "cipher": "********",
    "cipher_tls13": "********",
    "sni": "",
    "alpn": ["h2", "http/1.1"],
    "reuse_session": true,
    "session_ticket": false,
    "curves": ""
  },
  "tcp": {
    "no_delay": true,
    "keep_alive": true,
    "reuse_port": false,
    "fast_open": false,
    "fast_open_qlen": 20
  }
}
``` trojan 配置是这样的,请问对应的client 配置怎么写呢