Client Architecture
Internal structure of the Exposr client.
File structure
- client
- __init__.py
- cli.py
- config.py
- connection.py
- tunnel.py
- main.py
Modules
main.py
Entry point. Registered as the exposr console command via the client.main:main entry point in setup.py.
cli.py
Command-line argument parsing. Handles expose, config, and server subcommands.
config.py
Configuration management. Reads/writes ~/.exposr/config.json and manages the agent token.
connection.py
Manages the persistent control connection to the server. Handles authentication, port registration, and CONNECT message handling.
tunnel.py
Handles individual data tunnels. Creates connections to both the local service and the server's data port, forwarding traffic bidirectionally.