trojan: add new scheme trojanc (trojan cleartext)

This commit is contained in:
nadoo committed 2020-10-11 01:15:28 +08:00
1 parent 175ef16a5c
commit 40ddd1be3a
8 files changed
+71 -29

No files matched your search

+14 -7
View File
@@ -18,20 +18,27 @@ import (
// Trojan is a base trojan struct.
type Trojan struct {
dialer proxy.Dialer
proxy proxy.Proxy
addr string
pass [56]byte
dialer proxy.Dialer
proxy proxy.Proxy
addr string
pass [56]byte
clearText bool
tlsConfig *tls.Config
serverName string
skipVerify bool
tlsConfig *tls.Config
certFile string
keyFile string
certFile string
keyFile string
}
func init() {
proxy.RegisterDialer("trojan", NewTrojanDialer)
proxy.RegisterServer("trojan", NewTrojanServer)
proxy.RegisterDialer("trojanc", NewClearTextDialer) // cleartext
proxy.RegisterServer("trojanc", NewClearTextServer) // cleartext
}
// NewTrojan returns a trojan proxy.