pub fn proxy(
fix_dirs: bool,
path: impl Into<PathBuf>,
outgoing_range: RangeInclusive<u16>,
incoming: HashMap<u16, Address>,
forward: Option<ForwardConfig>,
) -> Result<(), Error>
Expand description
Handles generating a new proxy.yml
config file.
§Arguments
fix_dirs
: if true, will generate missing directories instead of complaining.path
: The path to write thepolicies.yml
to.outgoing_range
: The range of ports to allocate for outgoing connections.incoming
: The map of incoming ports to internal destinations to setup for incoming ports.forward
: The settings for forwaring traffic to a SOCKS proxy, if enabled.
§Returns
Nothing, but does write a new file to the given path and updates the user on stdout on success.
§Errors
This function may error if I/O errors occur while writing the file.