Skip to content

Commit

Permalink
fix: update keepalive params
Browse files Browse the repository at this point in the history
  • Loading branch information
rapiz1 committed Mar 8, 2022
1 parent 3dd8ced commit 411a147
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ type = "tcp" # Optional. Possible values: ["tcp", "tls", "noise"]. Default: "tcp
[client.transport.tcp] # Optional
proxy = "socks5://user:passwd@127.0.0.1:1080" # Optional. Use the proxy to connect to the server
nodelay = false # Optional. Determine whether to enable TCP_NODELAY, if applicable, to improve the latency but decrease the bandwidth. Default: false
keepalive_secs = 10 # Optional. Specify `tcp_keepalive_time` in `tcp(7)`, if applicable. Default: 10 seconds
keepalive_interval = 5 # Optional. Specify `tcp_keepalive_intvl` in `tcp(7)`, if applicable. Default: 5 seconds
keepalive_secs = 20 # Optional. Specify `tcp_keepalive_time` in `tcp(7)`, if applicable. Default: 20 seconds
keepalive_interval = 8 # Optional. Specify `tcp_keepalive_intvl` in `tcp(7)`, if applicable. Default: 8 seconds

[client.transport.tls] # Necessary if `type` is "tls"
trusted_root = "ca.pem" # Necessary. The certificate of CA that signed the server's certificate
Expand Down Expand Up @@ -142,8 +142,8 @@ heartbeat_interval = 30 # Optional. Set to 0 to disable the heartbeat. Default:
[server.transport] # Same as `[client.transport]`
type = "tcp"
nodelay = false
keepalive_secs = 10
keepalive_interval = 5
keepalive_secs = 20
keepalive_interval = 8

[server.transport.tls] # Necessary if `type` is "tls"
pkcs12 = "identify.pfx" # Necessary. pkcs12 file of server's certificate and private key
Expand Down
4 changes: 2 additions & 2 deletions src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use tracing::{error, trace};

pub const DEFAULT_NODELAY: bool = false;

pub const DEFAULT_KEEPALIVE_SECS: u64 = 10;
pub const DEFAULT_KEEPALIVE_INTERVAL: u64 = 3;
pub const DEFAULT_KEEPALIVE_SECS: u64 = 20;
pub const DEFAULT_KEEPALIVE_INTERVAL: u64 = 8;

/// Specify a transport layer, like TCP, TLS
#[async_trait]
Expand Down

0 comments on commit 411a147

Please sign in to comment.