weed-cli 1.4.3__tar.gz → 1.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weed-cli
3
- Version: 1.4.3
3
+ Version: 1.4.4
4
4
  Summary: Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel
5
5
  License: MIT
6
6
  Keywords: p2p,video,censorship-resistant,discovery,dht,kademlia,nat-traversal
@@ -714,6 +714,56 @@ python3 weed.py serve 0.0.0.0 8080 # reachable from your phone; prints a scan
714
714
  # or, from the shell: `serve [bind] [port]`
715
715
  ```
716
716
 
717
+ ### `Dockerfile.node` + `docker-compose.node.yml` — a node in a container
718
+
719
+ Same `web_ui.py`, packaged to run somewhere other than a laptop — a
720
+ always-on box, a VPS, anywhere you'd rather not keep a terminal open.
721
+ Separate from the repo's other Dockerfiles on purpose: `Dockerfile` is
722
+ `poc_network_challenge.py`'s holder/relay/verifier demo, and
723
+ `Dockerfile.discovery-relay` / `Dockerfile.tunnel-relay` are the two
724
+ dumb store-and-forward relays; this one is the actual node a person
725
+ runs, `node.py` + `web_ui.py` + the static `web/` frontend.
726
+
727
+ Identity key, reputation store, and library manifest all persist across
728
+ restarts — `$HOME` is pointed at a named volume (`node-data`) inside the
729
+ container, and all three are read/written via `os.path.expanduser`
730
+ (`node.py`'s `IDENTITY_PATH`, `web_ui.py`'s `LIBRARY_PATH`/reputation
731
+ store), so one volume covers all three instead of generating a fresh
732
+ throwaway pubkey every restart. `downloads/` gets its own symlink into
733
+ the same volume for the same reason.
734
+
735
+ `/share` is a separate, optional *bind* mount rather than another named
736
+ volume, on purpose: the `.ott` archives you're hosting should be real
737
+ files on the host you can see/add/remove directly, not hidden inside
738
+ Docker's volume storage. Defaults to `./share` next to the compose file
739
+ (created empty on first run if missing); override with `WEED_SHARE_DIR`.
740
+ In the web UI's Host form, point the archive dir at `/share` — that's
741
+ this same host directory, from inside the container.
742
+
743
+ Hosting a directory with more than one archived file needed its own
744
+ fix here: `_run_host_job` originally used `find_manifest_entry`
745
+ (singular — collapses to the single most-recently-added file), the
746
+ exact same bug `load_manifest_entries` (plural) was already written to
747
+ fix for `shell.py`'s `do_host`. Ported the same loop — every file in
748
+ the directory now gets announced to the relay and, if `--tunnel` is in
749
+ use, its own tunnel registration (one control connection per file,
750
+ same as `do_host`). A second, unrelated bug surfaced testing this for
751
+ real: `last_path` in a manifest entry is an absolute path recorded at
752
+ `ott add` time, on whatever machine ran it — trusted unconditionally,
753
+ it broke the instant the same content was mounted somewhere else (e.g.
754
+ `/share` in the container vs. `/home/user/share` where it was
755
+ originally archived), since a stale-but-non-empty `last_path` still
756
+ short-circuited past a perfectly valid `archive_dir` fallback. Fixed
757
+ with `node.resolve_file_path(entry, archive_dir)`, used by
758
+ `run_host_server`, `web_ui.py`'s host job, and `shell.py`'s `do_host`
759
+ alike: trust `last_path` only if it actually exists on disk.
760
+
761
+ ```bash
762
+ make node # build + run, http://127.0.0.1:8080, data persists in a named volume
763
+ make node-down # stop it (data survives)
764
+ WEED_SHARE_DIR=~/Movies make node # mount a real directory of .ott archives at /share
765
+ ```
766
+
717
767
  ### `shell.py` — interactive, tab-completing, same pattern as `ott`'s shell
718
768
 
719
769
  `python3 weed.py` with no arguments (or `weed.py shell`) drops into an
@@ -790,6 +840,7 @@ python3 poc_real_archive_challenge.py # same challenge mechanism, real
790
840
  python3 poc_discovery.py # 3 real relays, personalized ranking, sybil test
791
841
  python3 tunnel_relay.py 9199 # NAT-traversal relay — see host --tunnel below
792
842
  python3 weed.py serve --bind 0.0.0.0 --port 8080 # local web UI, reachable from your phone
843
+ make node # same web UI, containerized, data persists — see Dockerfile.node
793
844
  python3 dht.py 8468 # real Kademlia DHT node — see dht.py above
794
845
  ```
795
846
 
@@ -684,6 +684,56 @@ python3 weed.py serve 0.0.0.0 8080 # reachable from your phone; prints a scan
684
684
  # or, from the shell: `serve [bind] [port]`
685
685
  ```
686
686
 
687
+ ### `Dockerfile.node` + `docker-compose.node.yml` — a node in a container
688
+
689
+ Same `web_ui.py`, packaged to run somewhere other than a laptop — a
690
+ always-on box, a VPS, anywhere you'd rather not keep a terminal open.
691
+ Separate from the repo's other Dockerfiles on purpose: `Dockerfile` is
692
+ `poc_network_challenge.py`'s holder/relay/verifier demo, and
693
+ `Dockerfile.discovery-relay` / `Dockerfile.tunnel-relay` are the two
694
+ dumb store-and-forward relays; this one is the actual node a person
695
+ runs, `node.py` + `web_ui.py` + the static `web/` frontend.
696
+
697
+ Identity key, reputation store, and library manifest all persist across
698
+ restarts — `$HOME` is pointed at a named volume (`node-data`) inside the
699
+ container, and all three are read/written via `os.path.expanduser`
700
+ (`node.py`'s `IDENTITY_PATH`, `web_ui.py`'s `LIBRARY_PATH`/reputation
701
+ store), so one volume covers all three instead of generating a fresh
702
+ throwaway pubkey every restart. `downloads/` gets its own symlink into
703
+ the same volume for the same reason.
704
+
705
+ `/share` is a separate, optional *bind* mount rather than another named
706
+ volume, on purpose: the `.ott` archives you're hosting should be real
707
+ files on the host you can see/add/remove directly, not hidden inside
708
+ Docker's volume storage. Defaults to `./share` next to the compose file
709
+ (created empty on first run if missing); override with `WEED_SHARE_DIR`.
710
+ In the web UI's Host form, point the archive dir at `/share` — that's
711
+ this same host directory, from inside the container.
712
+
713
+ Hosting a directory with more than one archived file needed its own
714
+ fix here: `_run_host_job` originally used `find_manifest_entry`
715
+ (singular — collapses to the single most-recently-added file), the
716
+ exact same bug `load_manifest_entries` (plural) was already written to
717
+ fix for `shell.py`'s `do_host`. Ported the same loop — every file in
718
+ the directory now gets announced to the relay and, if `--tunnel` is in
719
+ use, its own tunnel registration (one control connection per file,
720
+ same as `do_host`). A second, unrelated bug surfaced testing this for
721
+ real: `last_path` in a manifest entry is an absolute path recorded at
722
+ `ott add` time, on whatever machine ran it — trusted unconditionally,
723
+ it broke the instant the same content was mounted somewhere else (e.g.
724
+ `/share` in the container vs. `/home/user/share` where it was
725
+ originally archived), since a stale-but-non-empty `last_path` still
726
+ short-circuited past a perfectly valid `archive_dir` fallback. Fixed
727
+ with `node.resolve_file_path(entry, archive_dir)`, used by
728
+ `run_host_server`, `web_ui.py`'s host job, and `shell.py`'s `do_host`
729
+ alike: trust `last_path` only if it actually exists on disk.
730
+
731
+ ```bash
732
+ make node # build + run, http://127.0.0.1:8080, data persists in a named volume
733
+ make node-down # stop it (data survives)
734
+ WEED_SHARE_DIR=~/Movies make node # mount a real directory of .ott archives at /share
735
+ ```
736
+
687
737
  ### `shell.py` — interactive, tab-completing, same pattern as `ott`'s shell
688
738
 
689
739
  `python3 weed.py` with no arguments (or `weed.py shell`) drops into an
@@ -760,6 +810,7 @@ python3 poc_real_archive_challenge.py # same challenge mechanism, real
760
810
  python3 poc_discovery.py # 3 real relays, personalized ranking, sybil test
761
811
  python3 tunnel_relay.py 9199 # NAT-traversal relay — see host --tunnel below
762
812
  python3 weed.py serve --bind 0.0.0.0 --port 8080 # local web UI, reachable from your phone
813
+ make node # same web UI, containerized, data persists — see Dockerfile.node
763
814
  python3 dht.py 8468 # real Kademlia DHT node — see dht.py above
764
815
  ```
765
816
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "weed-cli"
7
- version = "1.4.3"
7
+ version = "1.4.4"
8
8
  description = "Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weed-cli
3
- Version: 1.4.3
3
+ Version: 1.4.4
4
4
  Summary: Censorship-resistant video PoC — discovery/hosting/download over signed relay events, a real Kademlia DHT, or a TLS-capable NAT-traversal tunnel
5
5
  License: MIT
6
6
  Keywords: p2p,video,censorship-resistant,discovery,dht,kademlia,nat-traversal
@@ -714,6 +714,56 @@ python3 weed.py serve 0.0.0.0 8080 # reachable from your phone; prints a scan
714
714
  # or, from the shell: `serve [bind] [port]`
715
715
  ```
716
716
 
717
+ ### `Dockerfile.node` + `docker-compose.node.yml` — a node in a container
718
+
719
+ Same `web_ui.py`, packaged to run somewhere other than a laptop — a
720
+ always-on box, a VPS, anywhere you'd rather not keep a terminal open.
721
+ Separate from the repo's other Dockerfiles on purpose: `Dockerfile` is
722
+ `poc_network_challenge.py`'s holder/relay/verifier demo, and
723
+ `Dockerfile.discovery-relay` / `Dockerfile.tunnel-relay` are the two
724
+ dumb store-and-forward relays; this one is the actual node a person
725
+ runs, `node.py` + `web_ui.py` + the static `web/` frontend.
726
+
727
+ Identity key, reputation store, and library manifest all persist across
728
+ restarts — `$HOME` is pointed at a named volume (`node-data`) inside the
729
+ container, and all three are read/written via `os.path.expanduser`
730
+ (`node.py`'s `IDENTITY_PATH`, `web_ui.py`'s `LIBRARY_PATH`/reputation
731
+ store), so one volume covers all three instead of generating a fresh
732
+ throwaway pubkey every restart. `downloads/` gets its own symlink into
733
+ the same volume for the same reason.
734
+
735
+ `/share` is a separate, optional *bind* mount rather than another named
736
+ volume, on purpose: the `.ott` archives you're hosting should be real
737
+ files on the host you can see/add/remove directly, not hidden inside
738
+ Docker's volume storage. Defaults to `./share` next to the compose file
739
+ (created empty on first run if missing); override with `WEED_SHARE_DIR`.
740
+ In the web UI's Host form, point the archive dir at `/share` — that's
741
+ this same host directory, from inside the container.
742
+
743
+ Hosting a directory with more than one archived file needed its own
744
+ fix here: `_run_host_job` originally used `find_manifest_entry`
745
+ (singular — collapses to the single most-recently-added file), the
746
+ exact same bug `load_manifest_entries` (plural) was already written to
747
+ fix for `shell.py`'s `do_host`. Ported the same loop — every file in
748
+ the directory now gets announced to the relay and, if `--tunnel` is in
749
+ use, its own tunnel registration (one control connection per file,
750
+ same as `do_host`). A second, unrelated bug surfaced testing this for
751
+ real: `last_path` in a manifest entry is an absolute path recorded at
752
+ `ott add` time, on whatever machine ran it — trusted unconditionally,
753
+ it broke the instant the same content was mounted somewhere else (e.g.
754
+ `/share` in the container vs. `/home/user/share` where it was
755
+ originally archived), since a stale-but-non-empty `last_path` still
756
+ short-circuited past a perfectly valid `archive_dir` fallback. Fixed
757
+ with `node.resolve_file_path(entry, archive_dir)`, used by
758
+ `run_host_server`, `web_ui.py`'s host job, and `shell.py`'s `do_host`
759
+ alike: trust `last_path` only if it actually exists on disk.
760
+
761
+ ```bash
762
+ make node # build + run, http://127.0.0.1:8080, data persists in a named volume
763
+ make node-down # stop it (data survives)
764
+ WEED_SHARE_DIR=~/Movies make node # mount a real directory of .ott archives at /share
765
+ ```
766
+
717
767
  ### `shell.py` — interactive, tab-completing, same pattern as `ott`'s shell
718
768
 
719
769
  `python3 weed.py` with no arguments (or `weed.py shell`) drops into an
@@ -790,6 +840,7 @@ python3 poc_real_archive_challenge.py # same challenge mechanism, real
790
840
  python3 poc_discovery.py # 3 real relays, personalized ranking, sybil test
791
841
  python3 tunnel_relay.py 9199 # NAT-traversal relay — see host --tunnel below
792
842
  python3 weed.py serve --bind 0.0.0.0 --port 8080 # local web UI, reachable from your phone
843
+ make node # same web UI, containerized, data persists — see Dockerfile.node
793
844
  python3 dht.py 8468 # real Kademlia DHT node — see dht.py above
794
845
  ```
795
846
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes