mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
tls: allow InsecureSkipVerify
This commit is contained in:
1 parent
cce6fcf6ef
commit
4a72e79002
17 files changed
+127
-128
No files matched your search
+6
-6
@@ -90,7 +90,7 @@ func (s *SSR) NextDialer(dstAddr string) proxy.Dialer { return s.dialer.NextDial
|
||||
func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
target := socks.ParseAddr(addr)
|
||||
if target == nil {
|
||||
return nil, errors.New("proxy-ssr unable to parse address: " + addr)
|
||||
return nil, errors.New("[ssr] unable to parse address: " + addr)
|
||||
}
|
||||
|
||||
cipher, err := shadowsocksr.NewStreamCipher(s.EncryptMethod, s.EncryptPassword)
|
||||
@@ -100,7 +100,7 @@ func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
c, err := s.dialer.Dial("tcp", s.addr)
|
||||
if err != nil {
|
||||
log.F("proxy-ssr dial to %s error: %s", s.addr, err)
|
||||
log.F("[ssr] dial to %s error: %s", s.addr, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
ssrconn := shadowsocksr.NewSSTCPConn(c, cipher)
|
||||
if ssrconn.Conn == nil || ssrconn.RemoteAddr() == nil {
|
||||
return nil, errors.New("proxy-ssr nil connection")
|
||||
return nil, errors.New("[ssr] nil connection")
|
||||
}
|
||||
|
||||
// should initialize obfs/protocol now
|
||||
@@ -119,7 +119,7 @@ func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
ssrconn.IObfs = obfs.NewObfs(s.Obfs)
|
||||
if ssrconn.IObfs == nil {
|
||||
return nil, errors.New("proxy-ssr unsupported obfs type: " + s.Obfs)
|
||||
return nil, errors.New("[ssr] unsupported obfs type: " + s.Obfs)
|
||||
}
|
||||
|
||||
obfsServerInfo := &ssr.ServerInfoForObfs{
|
||||
@@ -132,7 +132,7 @@ func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
ssrconn.IProtocol = protocol.NewProtocol(s.Protocol)
|
||||
if ssrconn.IProtocol == nil {
|
||||
return nil, errors.New("proxy-ssr unsupported protocol type: " + s.Protocol)
|
||||
return nil, errors.New("[ssr] unsupported protocol type: " + s.Protocol)
|
||||
}
|
||||
|
||||
protocolServerInfo := &ssr.ServerInfoForObfs{
|
||||
@@ -163,5 +163,5 @@ func (s *SSR) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
// DialUDP connects to the given address via the proxy.
|
||||
func (s *SSR) DialUDP(network, addr string) (net.PacketConn, net.Addr, error) {
|
||||
return nil, nil, errors.New("proxy-ssr udp not supported now")
|
||||
return nil, nil, errors.New("[ssr] udp not supported now")
|
||||
}
|
||||
Reference in new issue
Block a user