53 Commits

Author SHA1 Message Date
Copilot 91d0f66cfa Fix CHISEL_KEY environment variable ignored when --keyfile not set (#571)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jpillora <633843+jpillora@users.noreply.github.com>
2025-09-11 22:17:06 +10:00
Jaime Pillora 59e5362e6b Bump to Go 1.22. Add .rpm .deb and .akp to releases. Fix bad version comparison. 2024-08-05 15:50:20 +10:00
guangwu dca1156401 chore: remove refs to deprecated io/ioutil (#459)
thanks @testwill
2023-10-19 22:58:31 +11:00
Jaime Pillora 69093be1d9 Bump to Go 1.21 (#440)
Co-authored-by: cmeng <cmenginnz@gmail.com>
2023-08-19 11:00:41 +10:00
0xflotus 28a5018b8b fix: small typo error in main.go (#334) 2022-10-31 15:52:31 +11:00
ip-rw 2b90de64cf Added --sni switch to control the ServerName when connecting with TLS. Makes 'domain fronting' possible. 2022-10-11 14:11:43 +02:00
ip-rw a64df5e37c Set ServerName (SNI) to *hostname. Useful for spoofing our way through restrictive gateways. 2022-08-26 20:41:34 +01:00
Jaime Pillora 6ddc09d281 document udp, log client connection failures, expose more settings via env-vars 2020-11-17 04:53:43 +11:00
Jaime Pillora f04afd2285 help goes to stdout and exits with 0, remove incorrect versioning from help 2020-11-17 03:13:22 +11:00
Simon Rüegg 2d6c5cba61 Update client to fall-back to MD5 fingerprints
Signed-off-by: Simon Rüegg <simon@rueggs.ch>
2020-11-10 08:44:36 +01:00
Will Xia 3542fb8e85 address PR code review feedback 2020-08-30 08:18:26 -04:00
Will Xia 7ca9034c47 mTLS authentication feature.
1. Adding client cert and key to Chisel client.
2. Adding trusted CAs to Chisel server.
3. Adding TLS/mTLS e2e test case and test certs and keys.
4. Adding flag and help comments.
2020-08-24 18:17:38 -04:00
Jaime Pillora 4f33489f62 fix multiple getters panic 2020-08-22 22:29:13 +10:00
Jaime Pillora 7c997d2db8 added client tls skip-verify and ca flags (closes #129 closes #116)
thanks to @mvladev and @alfonso-presa, I couldn't merge your PRs since I've done a massive refactor, though I borrowed snippets from them
2020-07-23 07:12:49 +10:00
Jaime Pillora d8b404bd02 add tls (and auto-certificate) support 2020-07-23 05:11:28 +10:00
Jaime Pillora 2da7d92721 fix udp reconnects 2020-07-19 05:33:08 +10:00
Jaime Pillora 53e72fe2ba add udp support, massive refactor and more (see below)
* split out share/ package into multiple subpackages
* added share/compat.go to keep backward compatibility(ish)
* moved shared tunnelling logic from client/server packages into share/tunnel/
* added remote protocol "<host>:<port>/<protocol>", currently supporting tcp and udp
* added an end-to-end test suite
* added TODO e2e tests as contribution targets
* added deep context integration for improved cleanup and cancellation
2020-07-18 11:05:53 +10:00
Jaime Pillora 591f95885f merge client stdio support (closes #166 thanks @BoleynSu!) 2020-06-17 21:44:37 +10:00
Boleyn Su a16c592dc8 This commit implements Feature Request #59
Now we can use the following command to connect to an SSH server through a chisel tunnel.
```bash
ssh -o ProxyCommand='/path/to/chisel client https://chisel.boleyn.su stdio:%h:%p' me@boleyn.su
```
2020-06-13 20:20:43 +09:00
Jaime Pillora 68050d031a merge client reverse+socks PR by @aus (closes #78)
- @aus's branch also includes PR for
custom headers, thanks @AkeemMcLennon  (closes #90)
- support client connections via socks
- add more architectures to the built releases
- remove vendor (go.sum will enforce correct deps)
2020-05-20 21:13:48 +10:00
aus 3f2899c789 derp 2019-08-28 17:04:35 -05:00
aus 1427263568 merge http header PR 2019-08-28 17:00:57 -05:00
aus a8075a0d69 merge PRs 2019-08-28 11:57:47 -05:00
aus 6d83df33d1 Merge branch 'client-socks' of https://github.com/aus/chisel into red 2019-08-28 11:46:40 -05:00
aus c9b6bf910c change import url to aus/chisel 2019-08-28 11:44:25 -05:00
Akeem McLennon 078007ee13 Add support for custom headers 2019-03-27 19:14:59 -05:00
aus cac0114b94 update usage for R:socks info 2019-02-23 22:52:32 -06:00
aus 8607fa10b4 rework to support remote R:socks syntax 2019-02-23 15:09:25 -06:00
Meteorite 7497a3acca add support for connecting to chisel server via socks5 proxy in client 2019-02-09 22:58:05 +03:00
aus 7eba7410fd add client-outbound SOCKS support 2019-02-02 22:06:16 -06:00
Jaime Pillora ee6601a6bb update help text 2019-01-28 20:22:58 +11:00
Nathan 21523b8b5c Add --hostname argument 2019-01-19 18:50:00 +00:00
Jaime Pillora d96b66e70b merged #72 which adds reverse tunnelling (thanks @sunshineco!), fixed potential race, USR2 to print go stats, many small cleanups 2018-12-29 22:51:40 +11:00
Eric Sunshine a11a3dd2dd server: add reverse port forwarding restrictions
Although reverse port forwarding (sharing client ports with the server)
should not generally leak any resources from the server to the client,
the facility may nevertheless be abused if the client is able to open a
server port which is otherwise meant for some other purpose on the
server. (This might happen, for instance, if a service on the server has
crashed or becomes somehow disabled, thus freeing the port which would
otherwise be occupied by the service.)

To mitigate such potential abuse, disable reverse port forwarding by
default and introduce server option --reverse to enable it explicitly.
Additionally, subject reverse port forwarding remotes to server-side
--authfile restrictions (for instance, "^R:0.0.0.0:7000$").
2018-12-23 16:25:45 -05:00
Eric Sunshine 8724c90273 support reverse port forwarding
Normal port forwarding shares server ports to the client, allowing the
client to access ports on the server (or ports on other machines
accessible from the server). Sometimes, however, it is necessary to
share ports in the opposite direction, allowing the server to access
ports on the client (or ports on other machines accessible from the
client). Reverse port forwarding is analogous to ssh's -R forwarding
which complements normal -L forwarding.

Reverse port forwarding remotes are specified as
"R:<local-interface>:<local-port>:<remote-host>:<remote-port>", where
<local-interface> and <local-port> refer to the server side, and
<remote-host> and <remote-port> refer to the client side. For instance,
"R:2222:localhost:22" forwards port 2222 on the server to port 22 on the
client.
2018-12-23 16:25:44 -05:00
Eric Sunshine 7cfb8e424c fix documentation, comment, status message typos 2018-12-23 16:25:44 -05:00
Jaime Pillora fa71a688a0 merge max-retry-interval, add max-retry-count 2018-10-20 23:46:42 +11:00
Jaime Pillora 6997312c1f merge config file watch, minor cleanup 2018-10-20 21:35:49 +11:00
Steven 7a3fa52b27 Add --max-retry-interval option for client. 2017-10-26 22:24:37 +08:00
Jaime Pillora d7b9d1c0ef minor docs, add socks guide 2017-04-08 16:40:37 +10:00
Jaime Pillora 26c6b88579 dockerfile fix again, minor logging changes 2017-04-07 23:14:48 +10:00
Jaime Pillora d818741c7d update dockerfile, default socks interface to localhost only 2017-04-07 21:49:44 +10:00
Jaime Pillora 6cb3ab2186 added SOCKS5 server support, added HTTP CONNECT Proxy client support, improved cli, improve docs, added badges 2017-04-07 20:18:15 +10:00
Jaime Pillora 6834725c7e merge --pid option, closes #26, thanks @xtyxtyx 2017-04-07 15:05:52 +10:00
kari fe69ee6adc Support for --pid option 2017-04-04 13:20:36 +08:00
kari 9005ee611f Support for --pid option 2017-04-04 13:13:41 +08:00
xtyxtyx f435532f4c add --pid option support 2017-04-04 12:42:09 +08:00
Jaime Pillora 74a9a324c4 added optional client keepalives 2015-03-20 16:08:41 +11:00
Jaime Pillora 4f600f65d9 docs, added timeout to client handshake 2015-03-19 13:06:30 +11:00
Jaime Pillora 1871137e32 ssh working, user auth working, addr whitelisting (mostly) working 2015-03-19 02:41:17 +11:00