File tree 2 files changed +4
-4
lines changed 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
"strings"
10
10
)
11
11
12
- // A PerHost directs connections to a default Dialer unless the hostname
12
+ // A PerHost directs connections to a default Dialer unless the host name
13
13
// requested matches one of a number of exceptions.
14
14
type PerHost struct {
15
15
def , bypass Dialer
@@ -76,7 +76,7 @@ func (p *PerHost) dialerForRequest(host string) Dialer {
76
76
77
77
// AddFromString parses a string that contains comma-separated values
78
78
// specifying hosts that should use the bypass proxy. Each value is either an
79
- // IP address, a CIDR range, a zone (*.example.com) or a hostname
79
+ // IP address, a CIDR range, a zone (*.example.com) or a host name
80
80
// (localhost). A best effort is made to parse the string and errors are
81
81
// ignored.
82
82
func (p * PerHost ) AddFromString (s string ) {
@@ -131,7 +131,7 @@ func (p *PerHost) AddZone(zone string) {
131
131
p .bypassZones = append (p .bypassZones , zone )
132
132
}
133
133
134
- // AddHost specifies a hostname that will use the bypass proxy.
134
+ // AddHost specifies a host name that will use the bypass proxy.
135
135
func (p * PerHost ) AddHost (host string ) {
136
136
if strings .HasSuffix (host , "." ) {
137
137
host = host [:len (host )- 1 ]
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ func (s *socks5) connect(conn net.Conn, target string) error {
154
154
buf = append (buf , ip ... )
155
155
} else {
156
156
if len (host ) > 255 {
157
- return errors .New ("proxy: destination hostname too long: " + host )
157
+ return errors .New ("proxy: destination host name too long: " + host )
158
158
}
159
159
buf = append (buf , socks5Domain )
160
160
buf = append (buf , byte (len (host )))
You can’t perform that action at this time.
0 commit comments