Skip to content

Commit

Permalink
v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rM-self-serve committed Feb 6, 2023
1 parent 2a89fa9 commit 2e29855
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 76 deletions.
67 changes: 1 addition & 66 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[package]
name = "webinterface-wifi"
version = "0.1.0"
version = "1.0.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hyper-reverse-proxy = "0.5.1"
hyper = { version = "0.14.23", features = ["full"] }
tokio = { version = "1.24.1", features = ["full"] }
hyper = "0.14.23"
tokio = { version = "1.24.1", features = ["macros", "rt-multi-thread"] }
local-ip-address = "0.5.0"
clap = "3.0"
regex = "1.7.1"
Expand Down
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebInterface-Wifi

### THIS IS NOT SECURE AND SHOULD ONLY BE USED ON PRIVATE, TRUSTED WIFI NETWORKS. DO NOT INSTALL IF YOU EVER CONNECT TO PUBLIC WIFI. ANYONE ON THE SAME WIFI NETWORK CAN UPLOAD/DOWNLOAD FILES TO/FROM YOUR TABLET.
### THIS IS NOT SECURE AND SHOULD ONLY BE USED ON PRIVATE, TRUSTED WIFI NETWORKS. ANYONE ON THE SAME WIFI NETWORK CAN UPLOAD/DOWNLOAD FILES TO/FROM YOUR TABLET.

This program will make the web interface available on wifi so long as the web interface is accessible internally.

Expand Down
4 changes: 2 additions & 2 deletions install-webint-wf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case :$PATH: in
esac

[[ -f $binfile ]] && rm $binfile
wget https://github.com/rM-self-serve/webinterface-wifi/releases/download/v1.0.1/webinterface-wifi \
wget https://github.com/rM-self-serve/webinterface-wifi/releases/download/v1.0.2/webinterface-wifi \
-P $localbin

chmod +x $localbin/webinterface-wifi
Expand All @@ -39,7 +39,7 @@ wget https://raw.githubusercontent.com/rM-self-serve/webinterface-wifi/master/we
systemctl daemon-reload

printf '\nFinished installing webinterface-wifi, removing install script\n\n'
printf 'To start the application, run:\n'
printf 'Run the following command to use webinterface-wifi\n'
printf 'systemctl start webinterface-wifi\n\n'
printf 'To automatically start the application after restarting, run:\n'
printf 'systemctl enable webinterface-wifi\n\n'
Expand Down
7 changes: 7 additions & 0 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ pub const EXEC_REGEX: &str = r"/webinterface-wifi *--run *\d+";
pub const EXEC_START: &str = "/webinterface-wifi --run";

pub const WEB_INTERFACE: &str = "http://10.11.99.1:80";

pub const CLI_ABOUT: &str = r"
View the web interface over wifi, if running.
Requires the web interface to be accesible at 10.11.99.1:80.
webinterface-wifi will run by default on port 80.
Once running, type the wifi ip address into your browser to view the web interface.
";
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::{App as ClapApp, AppSettings, Arg};
use constants::APP_NAME;
use constants::{APP_NAME, CLI_ABOUT};
mod constants;
mod net_interface;
mod server;
Expand All @@ -8,17 +8,18 @@ mod set_port;
fn main() {
let matches = ClapApp::new(APP_NAME)
.setting(AppSettings::ArgRequiredElseHelp)
.about(CLI_ABOUT)
.arg(
Arg::new("run")
.long("run")
.help("Starts webinterface-wifi in shell with specified port")
.help("Starts webinterface-wifi in current shell with specified port")
.takes_value(true)
.value_name("port"),
)
.arg(
Arg::new("set-port")
.long("set-port")
.help("Configure the default port to expose on the wifi interface")
.help("Set the port webinterface-wifi will run on")
.takes_value(true)
.value_name("port"),
)
Expand Down

0 comments on commit 2e29855

Please sign in to comment.