From eeeabbf99913ac632d3f3166af8966104daea0e9 Mon Sep 17 00:00:00 2001 From: MarcusGrass Date: Sun, 28 Sep 2025 19:25:39 +0200 Subject: [PATCH 1/3] docs: add build instructions to the readme --- Readme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Readme.md b/Readme.md index c8b318d..3ffb841 100644 --- a/Readme.md +++ b/Readme.md @@ -66,6 +66,37 @@ it can be used to connect to a remote `p2proxyd` service. See its readme for more details [here](./p2proxy-desktop/Readme.md). +## Building + +To build, you need a rust toolchain, you can get one [through rustup](https://rust-lang.org/tools/install/) for +example. + +You need `libglib2.0-dev` and `libgtk-3-dev` to build the desktop app. The proxy and cli does not need these +extra dependencies (as far as I'm aware). + +### Daemon + +`cargo b -r -p p2proxyd`, binary ends up in `target/release/p2proxyd` + +### CLI + +`cargo b -r -p p2proxy-cli`, binary ends up in `target/release/p2proxy-cli` + +### Desktop + +`cargo b -r -p p2proxy-desktop`, binary ends up in `target/release/p2proxy-desktop` + +### Android app + +Can be built using flutter: + +To build release, you need to set up signing-configs, +[see the flutter docs](https://docs.flutter.dev/deployment/android#configure-signing-in-gradle) + +```shell +cd p2proxy_fl && flutter build appbundle --debug +``` + ## License This project is licensed under [GPLv3](./LICENSE). From 2407b108ad7f2df62dba270df9c557e314172ff6 Mon Sep 17 00:00:00 2001 From: MarcusGrass Date: Sun, 28 Sep 2025 19:27:19 +0200 Subject: [PATCH 2/3] docs: fixup p2proxyd readme after config changes --- p2proxyd/Readme.md | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/p2proxyd/Readme.md b/p2proxyd/Readme.md index aec219f..c690031 100644 --- a/p2proxyd/Readme.md +++ b/p2proxyd/Readme.md @@ -51,13 +51,12 @@ Which nodes can access which routes. The simplest example is this: ```toml -# Node id: 7003b83df94765d4862185187508055e11be90d761663061e4f368d076b7a9b8 -secret_key_hex = "11701920da9f96a52625963997db5bc54e27ea86b00094646e2e860c4a8fa796" -allow_any_peer = true +# Node id: 7c32ab7cdd9a4e2651c9eff072958a43a9b411cc5b69603a1dca6d7d843f2406 +secret_key_hex = "8c3981f6f98d0a09f69931549a883d8ce1c37fbf767c28ace12c81ede4713bfc" default_route = "default" [[server_ports]] -port = 8080 +port = 4501 name = "default" allow_any_peer = true ``` @@ -69,8 +68,8 @@ depending on what's running on port 8080. ### Full configuration example ```toml -# Node id: 7003b83df94765d4862185187508055e11be90d761663061e4f368d076b7a9b8 -secret_key_hex = "11701920da9f96a52625963997db5bc54e27ea86b00094646e2e860c4a8fa796" +# Node id: f2b1ce018dda1d4e75d97fc9f86ecf30adbb0aba0977445ae85283502a8cc7be +secret_key_hex = "690927f498c370cff79be198b1e6b81e3ec12521d1a76753c8aff67a7bb6f549" # Use an access log, writes down accepted and rejected connections, with cause # If using, the log *should* be rotated with f.e. `logrotate` access_log_path = "/home//logs/p2proxy-access.log" @@ -80,32 +79,31 @@ default_route = "demo" # A collection of exposed services through the proxy [[server_ports]] # Ip, if for example there's an entry-server that runs the proxy to some other server on a local network. -host_ip = "192.168.0.3" +host_ip = "127.0.0.1" # Port to listen on -port = 4500 +port = 4502 # Port name for routing name = "demo" # Allow any peer to connect to this service allow_any_peer = true [[server_ports]] -# Only a port specified, uses `0.0.0.0:8080` -port = 8080 +# Only a port specified, uses `0.0.0.0:4502` +port = 4503 # Port name for routing name = "private" # A collection of approved peers [[peers]] -# The peer node's node_id -node_id = "7003b83df94765d4862185187508055e11be90d761663061e4f368d076b7a9b7" +# The peer node's node_id (assets/testing-has-access-private-client.key) +node_id = "69a0507ed92bf714b99135024a15628ad508a90db9e142a8518e7a9d939de7ba" # If the peer node can access anything (superuser) allow_any_port = false # The ports that this peer is allowed to reach ("demo" has no access control, so it can reach that one as well) allow_named_ports = ["private"] [[peers]] -node_id = "7003b83df94765d4862185187508055e11be90d761663061e4f368d076b7a9b6" -# Superuser, can access any service +# Superuser, can access any service (assets/testing/superuser-client.key) +node_id = "7d835f80eb895097e3b1a3648dee0e40e30733b76cdc30144b98c9b467a0f845" allow_any_port = true - ``` From f000c7f72d2d30eb3f12a671ee1c0ad5e236a476 Mon Sep 17 00:00:00 2001 From: MarcusGrass Date: Sun, 28 Sep 2025 19:28:49 +0200 Subject: [PATCH 3/3] chore: update gitleaksignore --- .gitleaksignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitleaksignore b/.gitleaksignore index e8de565..3b65d2a 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -3,4 +3,6 @@ 44e161fd06967f9c71b3f5c95e82729a54ae0d70:Readme.md:generic-api-key:26 44e161fd06967f9c71b3f5c95e82729a54ae0d70:assets/config/simple.toml:generic-api-key:2 44e161fd06967f9c71b3f5c95e82729a54ae0d70:p2proxyd/Readme.md:generic-api-key:55 -44e161fd06967f9c71b3f5c95e82729a54ae0d70:p2proxyd/Readme.md:generic-api-key:73 \ No newline at end of file +44e161fd06967f9c71b3f5c95e82729a54ae0d70:p2proxyd/Readme.md:generic-api-key:73 +2407b108ad7f2df62dba270df9c557e314172ff6:p2proxyd/Readme.md:generic-api-key:55 +2407b108ad7f2df62dba270df9c557e314172ff6:p2proxyd/Readme.md:generic-api-key:72 \ No newline at end of file