mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
rule: optimized codes
This commit is contained in:
1 parent
84b00d6db6
commit
04c65fb444
10 files changed
+97
-100
No files matched your search
+2
-2
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/nadoo/glider/common/log"
|
||||
)
|
||||
|
||||
// Direct proxy
|
||||
// Direct proxy.
|
||||
type Direct struct {
|
||||
iface *net.Interface // interface specified by user
|
||||
ip net.IP
|
||||
@@ -16,7 +16,7 @@ type Direct struct {
|
||||
relayTimeout time.Duration
|
||||
}
|
||||
|
||||
// Default dialer
|
||||
// Default dialer.
|
||||
var Default = &Direct{dialTimeout: time.Second * 3}
|
||||
|
||||
// NewDirect returns a Direct dialer.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package proxy
|
||||
|
||||
import "net"
|
||||
|
||||
// Proxy is a dialer manager
|
||||
// Proxy is a dialer manager.
|
||||
type Proxy interface {
|
||||
// Dial connects to the given address via the proxy.
|
||||
Dial(network, addr string) (c net.Conn, dialer Dialer, err error)
|
||||
|
||||
Reference in new issue
Block a user