-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: remove hardcoded config parts in SS
- Loading branch information
1 parent
931e049
commit f784313
Showing
12 changed files
with
119 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//! Specific config for the ss client, with more fields like password, | ||
//! and others like cipher method(adding later) | ||
|
||
use serde::Deserialize; | ||
|
||
// A Config currently contains the local + remote ip & port | ||
#[derive(Debug, Deserialize, Clone)] | ||
pub struct SSConfig { | ||
pub remote_address: String, | ||
pub remote_port: u32, | ||
pub local_address: String, | ||
pub local_port: u32, | ||
pub password: String, | ||
pub bypass: bool, | ||
// NOTE: will add the config for ciphter method later | ||
// pub method: CipherKind, | ||
} | ||
|
||
impl Default for SSConfig { | ||
fn default() -> Self { | ||
Self::new() | ||
} | ||
} | ||
|
||
// implement a constructor for the config | ||
impl SSConfig { | ||
pub fn new() -> Self { | ||
SSConfig { | ||
remote_address: String::from("example.com"), | ||
remote_port: 8082, | ||
local_address: String::from("127.0.0.1"), | ||
local_port: 8080, | ||
password: String::from("Test!23"), | ||
bypass: false, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+116 KB
(100%)
examples/water_bins/ss_client_wasm_v1/ss_client_wasm.wasm
100644 → 100755
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters