File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-driver " : patch
3+ ---
4+
5+ Expose ` native-host ` option in tauri-driver and set default to ` 127.0.0.1 ` .
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ FLAGS:
1313OPTIONS:
1414 --port NUMBER Sets the tauri-driver intermediary port
1515 --native-port NUMBER Sets the port of the underlying WebDriver
16+ --native-host HOST Sets the host of the underlying WebDriver (Linux only)
1617 --native-driver PATH Sets the path to the native WebDriver binary
1718" ;
1819
1920#[ derive( Debug , Clone ) ]
2021pub struct Args {
2122 pub port : u16 ,
2223 pub native_port : u16 ,
24+ pub native_host : String ,
2325 pub native_driver : Option < PathBuf > ,
2426}
2527
@@ -42,6 +44,7 @@ impl From<pico_args::Arguments> for Args {
4244 let parsed = Args {
4345 port : args. value_from_str ( "--port" ) . unwrap_or ( 4444 ) ,
4446 native_port : args. value_from_str ( "--native-port" ) . unwrap_or ( 4445 ) ,
47+ native_host : args. value_from_str ( "--native-host" ) . unwrap_or ( String :: from ( "127.0.0.1" ) ) ,
4548 native_driver,
4649 } ;
4750
Original file line number Diff line number Diff line change @@ -47,5 +47,6 @@ pub fn native(args: &Args) -> Command {
4747 let mut cmd = Command :: new ( native_binary) ;
4848 cmd. env ( "TAURI_AUTOMATION" , "true" ) ;
4949 cmd. arg ( format ! ( "--port={}" , args. native_port) ) ;
50+ cmd. arg ( format ! ( "--host={}" , args. native_host) ) ;
5051 cmd
5152}
You can’t perform that action at this time.
0 commit comments