Skip to main content

Proxy TCP ports of local systems

Project description

License: MIT PyPI - Python Version Code style: black

socket-proxy

This tool allows to forward TCP or HTTP ports to a server and make them available through the server. TCP ports will be mapped to ports of the server. HTTP forwarding is done with a simple reverse proxy using sub-domains. It consists of a client and server part. The server is listening for incoming connections from clients and creates additional listeners upon connection. These can be used to directly contact the TCP port set up as destination in the connecting client.

Security

With this tool you can publish local service which might cause security issues for non-hardened ports. You should consider further security measurements to harden critical systems if used. The HTTP implementation is very basic. It's recommended to use a reverse proxy like nginx with SSL and a wildcard certificate if HTTPS is required.

Features

  • TLS encryption of the tunnel
  • Support for client certificates if CA is specified on the server
  • Support for IPv4 and IPv6
  • Proxy generic TCP ports or more specific HTTP servers
  • Limitation of number of tunnels, clients per tunnel, and connections per IP
  • Limit the access to specific IP's
  • Configuration on server and client side and negotiation of the used settings

Usage

  1. Generate CA and certificates to be used on the server and client (e.g. using certs.sh of the package, easy-rsa, or openssl directly)

  2. Start a tunnel server using a certificate and matching private key

$ socket_proxy server --cert certificate.pem --key certificate.key
  1. Start a tunnel client and connect to a server. Tunnelled connections can access server reachable under TARGET:PORT
$ socket_proxy client --ca ca.pem -c SERVER -d TARGET:PORT
  1. Connect clients to the opened ports on the server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socket_proxy-2.3.3-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file socket_proxy-2.3.3-py3-none-any.whl.

File metadata

  • Download URL: socket_proxy-2.3.3-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for socket_proxy-2.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c9fa2a737222d66aab0fd0a5eb7e9e2bb8ec922c6063d691b99c653a1dc0f76
MD5 141c1dd1eb3996e02dfcc0c1a1de83e6
BLAKE2b-256 12a1320e42f7df820b1a93bd44d28d420886f6dbd91465699a0696c086d64cd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page