- Runs server as libary, configured for code-server port-forwarding
- Listens for initial "Open in Browser" connection and returns configured
chisel clientcommand with cookie header
-
Run local command that needs to be forwarded
Ex: netcat listening on UDP 9999
netcat -l -k -u localhost 9999 # or any command -
Build and run with tunnel port
go build \ -ldflags="-s -w -X github.com/jpillora/chisel/share.BuildVersion=1.9.1" \ -o code-server-chisel \ github.com/micahyoung/code-server-chisel ./code-server-chisel server -p 8082 -
Click "Open in Browser" and copy command to clipboard
-
Paste the copied command, replacing the
# add local portcomment with the server-side local command portEx: pasted command with "9999/udp" appended
chisel client --header 'Cookie: code-server-session=...' https://localhost:8080/proxy/8082 9999/udp -
Run the local client command to send data
echo "hello" | nc -u localhost 9999