Skip to main content

Python proxy-server lib

Can be used in cases when it is required to connect from white-ip server go grey-ip client. In fact, the websocket connection is initiated by client and then it is kept alive until program/container is stopped. Any data passed in binary format to client is redirected to server and vice versa. There are two possible options to use this lib: via running separate containers and via importing it from python.

Option with separate containers

  1. Create Dockerfiles from the following two files with the same config
  2. Run container with client_side.py on a client machine
  3. Run container with server_side.py on a server machine
from proxy_connector.connection_config import ConnectionConfig

config = ConnectionConfig(remote_proxy_ip=<ip of a server>, 
                          remote_listen_port=<server listen port>, 
                          remote_forward_port=<internal proxy port>,
                          local_proxy_ip=<ip of a client>,
                          local_forward_port=<client listen port>,
                          local_source_port=<port within container>)

# example
config = ConnectionConfig(remote_proxy_ip="192.168.1.34", 
                          remote_listen_port=4805, 
                          remote_forward_port=61842,
                          local_proxy_ip="192.168.1.34",
                          local_forward_port=8008,
                          local_source_port=12215)

client_side.py

from time import sleep
import threading

from proxy_connector.local_client import ProxyClient
# import config

server = ProxyClient(config)

main_thread = threading.Thread(target=server.start_client)
main_thread.start()
# do something
server.stop_server()
main_thread.join()

server_side.py

from time import sleep
import threading

from proxy_connector.remote_proxy import ProxyServer
# import config

server = ProxyServer(config)

main_thread = threading.Thread(target=server.start_server)
main_thread.start()
# do something
server.stop_server()
main_thread.join()

Metadata

Release files for proxy-connector 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proxy-connector 0.1.1
File Size Uploaded
proxy_connector-0.1.1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proxy-connector 0.1.1
File Interpreter ABI Platform
proxy_connector-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / proxy_connector-0.1.1.tar.gz

Download URL proxy_connector-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
deaa7606ad8924559098fb967db0b6aedb9dd821685a072bf8edb7871c514f64
BLAKE2b-256 checksum
How to use checksums
e2c189e056d460bbd5853ce82409a2bf48ada22c734d6acf01fe818ade4fc6fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2025.

Transparency log

Release files / proxy_connector-0.1.1-py3-none-any.whl

Download URL proxy_connector-0.1.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1657d1ea210be5f44d788998ea8bbee36aaa1e7cf8bb806f5bf814e7436e61d1
BLAKE2b-256 checksum
How to use checksums
db21ced6c56c18c6cf40e0a338a75ef539eb4a2eb5c99df7227c9f1acb681d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page