mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
Merge pull request #2 from FoxMoss/multiplexed
Procedual GET Arg For The Wisp Client Demo
This commit is contained in:
commit
f1446a9b27
1 changed files with 8 additions and 4 deletions
|
@ -52,16 +52,20 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
|||
.ok_or(StrError::new("no src port"))?
|
||||
.parse()?;
|
||||
|
||||
let addr_dest = std::env::args()
|
||||
let addr_path = std::env::args()
|
||||
.nth(3)
|
||||
.ok_or(StrError::new("no src path"))?;
|
||||
|
||||
let addr_dest = std::env::args()
|
||||
.nth(4)
|
||||
.ok_or(StrError::new("no dest addr"))?;
|
||||
|
||||
let addr_dest_port: u16 = std::env::args()
|
||||
.nth(4)
|
||||
.nth(5)
|
||||
.ok_or(StrError::new("no dest port"))?
|
||||
.parse()?;
|
||||
let should_tls: bool = std::env::args()
|
||||
.nth(5)
|
||||
.nth(6)
|
||||
.ok_or(StrError::new("no should tls"))?
|
||||
.parse()?;
|
||||
|
||||
|
@ -74,7 +78,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
|||
};
|
||||
let req = Request::builder()
|
||||
.method("GET")
|
||||
.uri("/")
|
||||
.uri(addr_path)
|
||||
.header("Host", &addr)
|
||||
.header(UPGRADE, "websocket")
|
||||
.header(CONNECTION, "upgrade")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue