Struct ptproxy::config::GeneralConfig
source · pub struct GeneralConfig {
pub mode: PeerMode,
pub peer_hostname: String,
pub quic_port: u16,
pub bind_address: IpAddr,
pub connect_address: Option<String>,
pub http_bind_address: Option<SocketAddr>,
pub http_connect_address: Option<String>,
}
Expand description
Parameters describing general proxy operation: mode, and connection details for the other peer and the source / target for HTTP/1.1 requests.
Fields§
§mode: PeerMode
Whether to connect to the target peer (Client
), or accept connections from it (Server
).
Required
peer_hostname: String
Hostname to match in the other peer’s certificate.
Required
quic_port: u16
UDP port where the QUIC server listens. In server mode, this determines the port to bind the socket at;
in client mode, this determines the port to connect to.
Default: 20010
bind_address: IpAddr
Address to bind the QUIC socket at (valid in both server and client mode).
Default: "::"
(IPv6 wildcard address)
connect_address: Option<String>
Only valid in client mode: overrides the address to connect to the peer over QUIC.
Default: uses the value of peer_hostname
http_bind_address: Option<SocketAddr>
Only valid in client mode: socket address to bind the listening HTTP/1.1 endpoint at.
Default: [::]:20080
http_connect_address: Option<String>
Only valid in server mode: socket address to send HTTP/1.1 requests (received from the peer) to.
Required