MCPcopy Index your code
hub / github.com/SapphicCode/protoplex

github.com/SapphicCode/protoplex @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
14 symbols 31 edges 11 files 11 documented · 79%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

protoplex

An application protocol multiplexer

Build Status

What is this?

In a nutshell, this application lets you run multiple kinds of applications on a single port. This is useful for, for instance, running an OpenVPN server and a TLS/HTTPS server on port 443, which in turn is useful for evading firewalls that block all other outbound ports.

Running

Native

Assuming you have a properly configured Go setup, get and compile the multiplexer with

go get github.com/Pandentia/protoplex/cmd/protoplex

and then run it with (for example, to run SSH and HTTPS)

protoplex --ssh your_ssh_host:22 --tls your_webserver:443

Protoplex is now running on port 8443 and ready to accept connections.

For more extensive configuration, please see the output of --help.

Docker

A docker image may be used for ease of use and deployment.

Goals

The concepts for this multiplexer were as follows:

  • Resource usage about on par with sslh
  • Easily extensible
  • Highly dynamic

To this end, protoplex supports multiple matching methods for protocols:

  • Bytestring comparison
  • Regex matching

These can both be implemented for a protocol, with bytestrings taking priority (due to efficiency). In addition, protocols support matching limits, reducing the amount of protocols evaluated for a given handshake.

Protocol support

Currently supported protocols are:

  • SSH
  • HTTP
  • TLS (/ HTTPS)
  • OpenVPN
  • SOCKS4 / SOCKS5

Feel free to file an issue on the GitHub repository if you want a protocol to be supported. Please include steps to accurately reproduce your client setup.

Alternatively, you may submit a pull request.

Core symbols most depended-on inside this repo

proxy
called by 2
protoplex/proxy.go
RunServer
called by 1
protoplex/multiplexer.go
ConnectionHandler
called by 1
protoplex/multiplexer.go
DetermineProtocol
called by 1
protoplex/multiplexer.go
NewOpenVPNProtocol
called by 1
protoplex/protocols/openvpn.go
NewHTTPProtocol
called by 1
protoplex/protocols/http.go
NewSOCKS4Protocol
called by 1
protoplex/protocols/socks4.go
NewSSHProtocol
called by 1
protoplex/protocols/ssh.go

Shape

Function 13
Struct 1

Languages

Go100%

Modules by API surface

protoplex/multiplexer.go3 symbols
cmd/protoplex/protoplex.go2 symbols
protoplex/proxy.go1 symbols
protoplex/protocols/tls.go1 symbols
protoplex/protocols/syncthing-relay.go1 symbols
protoplex/protocols/ssh.go1 symbols
protoplex/protocols/socks5.go1 symbols
protoplex/protocols/socks4.go1 symbols
protoplex/protocols/protocol.go1 symbols
protoplex/protocols/openvpn.go1 symbols
protoplex/protocols/http.go1 symbols

For agents

$ claude mcp add protoplex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact