增加防探测功能,增加流量加密功能

This commit is contained in:
wenyifan
2022-09-09 15:29:41 +08:00
parent c2ab6cbe5f
commit a064f72104
12 changed files with 185 additions and 79 deletions

View File

@ -42,11 +42,15 @@ func (c *Client) Start() {
}
func handlerClient(conn net.Conn, serverAddress string, fakeAddressSNI string) {
config := &tls.Config{
ServerName: fakeAddressSNI,
}
if HandshakePassword != "" {
config.Rand = RandReaderObj
}
dial, err := tls.DialWithDialer(&net.Dialer{
Timeout: time.Second * 5,
}, "tcp", serverAddress, &tls.Config{
ServerName: fakeAddressSNI,
})
}, "tcp", serverAddress, config)
if err != nil {
fmt.Printf("[Client] Dial server error: %v\n", err)
return