Skip to content

Commit ee6601a

Browse files
committed
update help text
1 parent 9698471 commit ee6601a

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ $ chisel server --help
116116
chisel receives a normal HTTP request. Useful for hiding chisel in
117117
plain sight.
118118
119-
--socks5, Allows client to access the internal SOCKS5 proxy. See
119+
--socks5, Allow clients to access the internal SOCKS5 proxy. See
120120
chisel client --help for more information.
121121
122-
--reverse, Allows client to specify reverse port forwarding remotes
122+
--reverse, Allow clients to specify reverse port forwarding remotes
123123
in addition to normal remotes.
124124
125125
--pid Generate pid file in current working directory
@@ -216,6 +216,9 @@ $ chisel client --help
216216
the chisel server. Authentication can be specified inside the URL.
217217
For example, http://admin:[email protected]:8081
218218
219+
--hostname, Optionally set the 'Host' header (defaults to the host
220+
defined in the endpoint url).
221+
219222
--pid Generate pid file in current working directory
220223
221224
-v, Enable verbose logging

client/client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ func (c *Client) connectionLoop() {
199199
return c.httpProxyURL, nil
200200
}
201201
}
202-
hostHeader := http.Header{}
203-
if c.config.HostHeader == "" {
204-
hostHeader = nil
205-
} else {
206-
hostHeader = http.Header{"Host": {c.config.HostHeader}}
202+
wsHeaders := http.Header{}
203+
if c.config.HostHeader != "" {
204+
wsHeaders = http.Header{
205+
"Host": {c.config.HostHeader},
206+
}
207207
}
208-
wsConn, _, err := d.Dial(c.server, hostHeader)
208+
wsConn, _, err := d.Dial(c.server, wsHeaders)
209209
if err != nil {
210210
connerr = err
211211
continue

main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ var serverHelp = `
124124
chisel receives a normal HTTP request. Useful for hiding chisel in
125125
plain sight.
126126
127-
--socks5, Allows client to access the internal SOCKS5 proxy. See
127+
--socks5, Allow clients to access the internal SOCKS5 proxy. See
128128
chisel client --help for more information.
129129
130-
--reverse, Allows client to specify reverse port forwarding remotes
130+
--reverse, Allow clients to specify reverse port forwarding remotes
131131
in addition to normal remotes.
132132
` + commonHelp
133133

@@ -264,7 +264,8 @@ var clientHelp = `
264264
the chisel server. Authentication can be specified inside the URL.
265265
For example, http://admin:[email protected]:8081
266266
267-
--hostname, An optional HOST header to send, can be left blank.
267+
--hostname, Optionally set the 'Host' header (defaults to the host
268+
found in the server url).
268269
` + commonHelp
269270

270271
func client(args []string) {

0 commit comments

Comments
 (0)