mirror of
https://github.com/jpillora/chisel
synced 2026-06-08 15:07:02 +00:00
fix documentation, comment, status message typos
This commit is contained in:
@@ -136,7 +136,7 @@ $ chisel client --help
|
||||
|
||||
<server> is the URL to the chisel server.
|
||||
|
||||
<remote>s are remote connections tunnelled through the server, each of
|
||||
<remote>s are remote connections tunneled through the server, each of
|
||||
which come in the form:
|
||||
|
||||
<local-host>:<local-port>:<remote-host>:<remote-port>
|
||||
@@ -239,7 +239,7 @@ localhost:1080
|
||||
|
||||
### Performance
|
||||
|
||||
With [crowbar](https://github.com/q3k/crowbar), a connection is tunnelled by repeatedly querying the server with updates. This results in a large amount of HTTP and TCP connection overhead. Chisel overcomes this using WebSockets combined with [crypto/ssh](https://golang.org/x/crypto/ssh) to create hundreds of logical connections, resulting in **one** TCP connection per client.
|
||||
With [crowbar](https://github.com/q3k/crowbar), a connection is tunneled by repeatedly querying the server with updates. This results in a large amount of HTTP and TCP connection overhead. Chisel overcomes this using WebSockets combined with [crypto/ssh](https://golang.org/x/crypto/ssh) to create hundreds of logical connections, resulting in **one** TCP connection per client.
|
||||
|
||||
In this simple benchmark, we have:
|
||||
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ func (c *Client) Wait() error {
|
||||
return <-c.runningc
|
||||
}
|
||||
|
||||
//Close manual stops the client
|
||||
//Close manually stops the client
|
||||
func (c *Client) Close() error {
|
||||
c.running = false
|
||||
if c.sshConn == nil {
|
||||
|
||||
@@ -94,7 +94,7 @@ var serverHelp = `
|
||||
variable PORT and fallsback to port 8080).
|
||||
|
||||
--key, An optional string to seed the generation of a ECDSA public
|
||||
and private key pair. All commications will be secured using this
|
||||
and private key pair. All communications will be secured using this
|
||||
key pair. Share the subsequent fingerprint with clients to enable detection
|
||||
of man-in-the-middle attacks (defaults to the CHISEL_KEY environment
|
||||
variable, otherwise a new key is generate each run).
|
||||
@@ -185,7 +185,7 @@ var clientHelp = `
|
||||
|
||||
<server> is the URL to the chisel server.
|
||||
|
||||
<remote>s are remote connections tunnelled through the server, each of
|
||||
<remote>s are remote connections tunneled through the server, each of
|
||||
which come in the form:
|
||||
|
||||
<local-host>:<local-port>:<remote-host>:<remote-port>
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/jpillora/chisel/share"
|
||||
)
|
||||
|
||||
// handleClientHandler is the main http sebsocket handler for the chisel server
|
||||
// handleClientHandler is the main http websocket handler for the chisel server
|
||||
func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) {
|
||||
//websockets upgrade AND has chisel prefix
|
||||
upgrade := strings.ToLower(r.Header.Get("Upgrade"))
|
||||
@@ -43,7 +43,7 @@ func (s *Server) handleClientHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("Not found"))
|
||||
}
|
||||
|
||||
// handleWebsocket is responsible for hanlding the websocket connection
|
||||
// handleWebsocket is responsible for handling the websocket connection
|
||||
func (s *Server) handleWebsocket(w http.ResponseWriter, req *http.Request) {
|
||||
id := atomic.AddInt32(&s.sessCount, 1)
|
||||
clog := s.Fork("session#%d", id)
|
||||
@@ -160,7 +160,7 @@ func (s *Server) handleSocksStream(l *chshare.Logger, src io.ReadWriteCloser) {
|
||||
conn := chshare.NewRWCConn(src)
|
||||
// conn.SetDeadline(time.Now().Add(30 * time.Second))
|
||||
atomic.AddInt32(&s.connOpen, 1)
|
||||
l.Debugf("%s Openning", s.connStatus())
|
||||
l.Debugf("%s Opening", s.connStatus())
|
||||
err := s.socksServer.ServeConn(conn)
|
||||
atomic.AddInt32(&s.connOpen, -1)
|
||||
if err != nil && !strings.HasSuffix(err.Error(), "EOF") {
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ func (s *Server) Wait() error {
|
||||
return s.httpServer.Wait()
|
||||
}
|
||||
|
||||
// Close forciable closes the http server
|
||||
// Close forcibly closes the http server
|
||||
func (s *Server) Close() error {
|
||||
return s.httpServer.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user