module
Version:
v0.0.0-...-0c2bc69
Opens a new window with list of versions in this module.
Published: Jan 23, 2022
License: MIT
Opens a new window with license information.
README
¶
mfrp
A mini fast reverse proxy. Just for study.
Passive Mode
- mfrpc has a public ip
- mfrpc starts, then listens on a public port
- client -> mfrpc -> server(nat) => client <-> mfrpc <-> server(nat)
Active Mode
- mfrps has a public ip
- mfrps starts, then listens on a public port
- mfrps waits for mfrpc's connection
- mfrpc connects to mfrps
- mfrpc > (control req) > mfrps (check: exist? password? idle?)
- not idle > fail message > mfrps (greet with mfrpc conn in use), closes connection
- idle > start the proxy server(listen on another public port -> working -> waits for user's connections) > success message
- client > mfrps -> (work req) > mfrpc (start another work conn) > (work req) > idle?(bad req, close) working?(handle)
Configuration
mfrpc
Common:
ServerHost: localhost
ServerPort: 9527
LogLevel: debug
ProxyServers:
- LocalPort: 8080
PassiveMode: true
BindAddr: 0.0.0.0
BindPort: 18124
- Name: mfrp
Password: mfrp
LocalPort: 8080
mfrps
Common:
BindAddr: 0.0.0.0
BindPort: 9527
LogLevel: debug
ProxyServers:
- Name: mfrp
Password: mfrp
BindAddr: 0.0.0.0
ListenPort: 18123
Click to show internal directories.
Click to hide internal directories.