This project, referred to as the "proxy" in the documentation, is designed to provide the necessary WebSocket-to-TCP translation required for the tools running inside of OctoPwn. This enables network communication between various components.
Upon starting the application, a WebSocket server is set up on localhost at port 8700. The server then waits for a connection from OctoPwn to facilitate the required communication.
- WebSocket-to-TCP translation: Facilitates communication between OctoPwn and other networked components.
| Feature | Windows | Linux | Mac |
|---|---|---|---|
| TCP Client | ✔ | ✔ | ✔ |
| TCP Server | ✘ | ✘ | ✘ |
| UDP Client | ✔ | ✔ | ✔ |
| UDP Server | ✘ | ✘ | ✘ |
| Local File Browser | ✔ | ✔ | ✔ |
| Authentication Proxy | ✔ | ✔ | ✔ |
- Golang version 1.22.5 or later
- OctoPwn set up and running
Clone the repository and navigate into the project directory:
git clone https://github.com/yourusername/wsnet-proxy.git
cd wsnet-proxy
# for linux OS
GOOS=linux GOARCH=amd64 go build -o wsnet-go
# for windows OS (supports auth proxy)
GOOS=windows GOARCH=amd64 go build -o wsnet-go.exe
# for tailscale version - linux -
GOOS=linux GOARCH=amd64 go build -tags tailscale -o wsnet_tailscale
# for tailscale version - windows -
GOOS=windows GOARCH=amd64 go build -tags tailscale -o wsnet_tailscale.exeRun the proxy server with the following command:
./wsnet-go [options]First time running you must provide a TS_AUTH_KEY as an env variable. Subsequent runs do not need the key.
TS_AUTH_KEY=tskey-auth-xx... ./wsnet_tailscaleThe following command-line options are available:
-
-port: Specifies the port on which the WebSocket server will listen. The default is8700.- Example:
-port 8080will start the server on port 8080.
- Example:
-
-address: Defines the address to which the server will bind. By default, it binds tolocalhost.- Example:
-address 0.0.0.0will bind the server to all available network interfaces.
- Example:
-
-uri-path: Sets the URI path (or UUID) for the WebSocket connection. This can be used to create specific endpoints for WebSocket communication.- Example:
-uri-path /ws/connectionwill make the WebSocket server available atws://localhost:8700/ws/connection.
- Example:
-
-ssl: Enables TLS security for the WebSocket connection.- Example:
-sslwill start the WebSocket server with TLS encryption.
- Example:
The application currently only supports the TCP client functionality. Other features such as TCP server, UDP client/server, local file browsing, and authentication proxy are not yet implemented.
- TCP Server Support: Enable the application to function as a TCP server, allowing it to accept incoming TCP connections.
- UDP Server: Add support for UDP server functionalities to handle datagram-based communication.
Contributions are welcome! Please submit a pull request or open an issue if you have suggestions or find a bug.