-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add direct devices TLS support; refactoring (#64)
* feat: massive internal refactoring * feat: fix doc + add 'doc' github action * feat: improve code; add TLS --------- Co-authored-by: LIAUD Corentin <[email protected]>
- Loading branch information
Showing
70 changed files
with
1,754 additions
and
946 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
mod emu; | ||
mod host; | ||
mod local; | ||
mod tcp; | ||
mod usb; | ||
|
||
pub use emu::EmuCommand; | ||
pub use host::HostCommand; | ||
pub use local::LocalCommand; | ||
pub use tcp::{TcpCommand, TcpCommands}; | ||
pub use usb::{UsbCommand, UsbCommands}; |
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,44 @@ | ||
use std::net::SocketAddr; | ||
use std::path::PathBuf; | ||
|
||
use clap::Parser; | ||
|
||
use crate::models::RebootTypeCommand; | ||
|
||
#[derive(Parser, Debug)] | ||
pub struct TcpCommand { | ||
pub address: SocketAddr, | ||
#[clap(subcommand)] | ||
pub commands: TcpCommands, | ||
} | ||
|
||
#[derive(Parser, Debug)] | ||
pub enum TcpCommands { | ||
/// Spawn an interactive shell or run a list of commands on the device | ||
Shell { commands: Vec<String> }, | ||
/// Pull a file from device | ||
Pull { source: String, destination: String }, | ||
/// Push a file on device | ||
Push { filename: String, path: String }, | ||
/// Stat a file on device | ||
Stat { path: String }, | ||
/// Run an activity on device specified by the intent | ||
Run { | ||
/// The package whose activity is to be invoked | ||
#[clap(short = 'p', long = "package")] | ||
package: String, | ||
/// The activity to be invoked itself, Usually it is MainActivity | ||
#[clap(short = 'a', long = "activity")] | ||
activity: String, | ||
}, | ||
/// Reboot the device | ||
Reboot { | ||
#[clap(subcommand)] | ||
reboot_type: RebootTypeCommand, | ||
}, | ||
/// Install an APK on device | ||
Install { | ||
/// Path to APK file. Extension must be ".apk" | ||
path: PathBuf, | ||
}, | ||
} |
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
Oops, something went wrong.