Added Config structure option to configuration type
This commit is contained in:
parent
b25ae45948
commit
1aa97d6493
2 changed files with 22 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use sslrelay::{self, ConfigType, HandlerCallbacks};
|
||||
use sslrelay::{self, ConfigType, RelayConfig, HandlerCallbacks};
|
||||
|
||||
|
||||
// Handler object
|
||||
|
|
@ -37,7 +37,15 @@ fn main() {
|
|||
let mut relay = sslrelay::SSLRelay::new(Handler);
|
||||
|
||||
// Load Configuration
|
||||
relay.load_config(ConfigType::Default);
|
||||
relay.load_config(ConfigType::Conf(RelayConfig {
|
||||
bind_host: "0.0.0.0".to_string(),
|
||||
bind_port: "443".to_string(),
|
||||
remote_host: "remote.com".to_string(),
|
||||
remote_port: "443".to_string(),
|
||||
ssl_private_key_path: "./remote.com.key".to_string(),
|
||||
ssl_cert_path: "./remote.com.crt".to_string(),
|
||||
verbose_level: 2,
|
||||
}));
|
||||
|
||||
// Start listening
|
||||
relay.start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue