feat: support UDP proxy of port 2022 and 2023 for P2Panda apps #70

Merged
p4u1 merged 3 commits from support-p2panda into master 2025-12-22 12:37:51 +00:00
Owner

Support P2P communication between P2Panda Apps

Apps built with the set of P2Panda libraries perform P2P communication over two UDP ports. The default ports for these are 2022 and 2023.

There aren't really a lot (any?) P2Panda web apps out there, most are desktop or mobile apps.

So, this change is being specifically request by the LoRes Tech project in order to support our LoRes Node app. We have a recipe drafted for this here and we will push that to the catalogue once this change is in.

It seems better to make this kiwix change as general as possible, which is why we called the flag P2PANDA_ENABLED rather than LORES_NODE_ENABLED. In practice if there was a larger ecosystem of such apps, we'd probably need to make the actual port numbers configurable.

# Support P2P communication between P2Panda Apps Apps built with the set of [P2Panda](https://p2panda.org/) libraries perform P2P communication over two UDP ports. The default ports for these are 2022 and 2023. There aren't really a lot (any?) P2Panda web apps out there, most are desktop or mobile apps. So, this change is being specifically request by the [LoRes Tech](https://lores.tech/) project in order to support our [LoRes Node](https://github.com/local-resilience-tech/lores-node/) app. We have a recipe drafted for this [here](https://codeberg.org/lores/lores-node-coop-cloud-recipe) and we will push that to the catalogue once this change is in. It seems better to make this kiwix change as general as possible, which is why we called the flag `P2PANDA_ENABLED` rather than `LORES_NODE_ENABLED`. In practice if there was a larger ecosystem of such apps, we'd probably need to make the actual port numbers configurable.
jade added 1 commit 2025-12-20 05:25:05 +00:00
feat: support UDP proxy of port 2022 and 2023 for P2Panda apps
Some checks failed
continuous-integration/drone/pr Build is failing
25910973b2
decentral1se reviewed 2025-12-21 15:33:29 +00:00
decentral1se left a comment
Owner

LGTM 🫶

Seems like you could also support an env var which is specific for your project as a duplicate env var that does the exact same thing? Only if you want that on the LoRes Tech ofc and it's handy to have some familiar naming for end-users. Just need to extend all conditional clauses to check both env vars...

LGTM 🫶 Seems like you could also support an env var which is specific for your project as a duplicate env var that does the exact same thing? Only if you want that on the LoRes Tech ofc and it's handy to have some familiar naming for end-users. Just need to extend all conditional clauses to check both env vars...
decentral1se reviewed 2025-12-21 15:34:11 +00:00
@ -37,6 +37,12 @@ entrypoints:
gitea-ssh:
address: ":2222"
{{ end }}
{{ if eq (env "P2PANDA_ENABLED") "1" }}
Owner

Oh wait a sec, you need to bump the config version:

abra.sh Line 1 in 88502ecda4
export TRAEFIK_YML_VERSION=v25

Oh wait a sec, you need to bump the config version: > https://git.coopcloud.tech/coop-cloud/traefik/src/commit/88502ecda424fff86eef2d76f1ef6c2e7c44539f/abra.sh#L1
Owner

For context: the env var need to be increased rverytime the file gets changed. This is necessary for all template files

For context: the env var need to be increased rverytime the file gets changed. This is necessary for all template files
Author
Owner

Ok, I've bumped this. I've also bumped it in the drone file, which was a bit out of date, hopefully that works.

Ok, I've bumped this. I've also bumped it in the drone file, which was a bit out of date, hopefully that works.
decentral1se marked this conversation as resolved
Owner

Very cool to see p2panda and lores tech here 😍

Very cool to see p2panda and lores tech here 😍
jade added 1 commit 2025-12-22 00:25:39 +00:00
bump the traefik yml version
Some checks failed
continuous-integration/drone/pr Build is failing
c4efd760c2
jade added 1 commit 2025-12-22 00:25:56 +00:00
Merge branch 'master' into support-p2panda
Some checks failed
continuous-integration/drone/pr Build is failing
08aee122e8
Author
Owner

Seems like you could also support an env var which is specific for your project as a duplicate env var that does the exact same thing? Only if you want that on the LoRes Tech ofc and it's handy to have some familiar naming for end-users. Just need to extend all conditional clauses to check both env vars...

I don't think we need that, we're not hiding P2Panda as an abstraction, and I think it makes sense for our users to know that's why we're exposing those ports.

> Seems like you could also support an env var which is specific for your project as a duplicate env var that does the exact same thing? Only if you want that on the LoRes Tech ofc and it's handy to have some familiar naming for end-users. Just need to extend all conditional clauses to check both env vars... I don't think we need that, we're not hiding P2Panda as an abstraction, and I think it makes sense for our users to know that's why we're exposing those ports.
p4u1 approved these changes 2025-12-22 07:16:19 +00:00
p4u1 merged commit 7e688c9094 into master 2025-12-22 12:37:50 +00:00
p4u1 deleted branch support-p2panda 2025-12-22 12:37:51 +00:00
Sign in to join this conversation.
No description provided.