mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
check: stop checking when protocol not supported
This commit is contained in:
1 parent
6820644073
commit
98ce20b295
9 files changed
+69
-122
No files matched your search
+2
-2
@@ -1,6 +1,7 @@
|
||||
package udp
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
"sync"
|
||||
@@ -15,7 +16,6 @@ type UDP struct {
|
||||
addr string
|
||||
dialer proxy.Dialer
|
||||
proxy proxy.Proxy
|
||||
server proxy.Server
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -120,7 +120,7 @@ func (s *UDP) Addr() string {
|
||||
|
||||
// Dial connects to the address addr on the network net via the proxy.
|
||||
func (s *UDP) Dial(network, addr string) (net.Conn, error) {
|
||||
return s.dialer.Dial("udp", s.addr)
|
||||
return nil, fmt.Errorf("can not dial tcp via udp dialer: %w", proxy.ErrNotSupported)
|
||||
}
|
||||
|
||||
// DialUDP connects to the given address via the proxy.
|
||||
|
||||
Reference in new issue
Block a user