Commit Graph
32 Commits
Author SHA1 Message Date
cblgh 5152783954 presets: use jasmine-teehaus community relays 2026-11-13 14:23:24 +01:00
cblgh fcfc990958 refactor(server,client): use iroh_ffi.SecretBytesFromString 2026-11-10 10:29:34 +01:00
cblgh 1aac83fac3 refactor(util): remove wire protocol methods 2026-11-10 10:22:43 +01:00
cblgh 7dec1aef21 use iroh_ffi.Pipe 2026-11-10 10:20:14 +01:00
cblgh 0ffd3eb146 cleanup(server): remove prints and simplify pushing logic
pushing to /v1/client always updates the associated data for the given
endpoint. under this design, it is up the endpoint to decide if they
want to maintain their data (by including it in the POST) or if they
want to erase any associated data (sending a POST with a zero payload).
2026-11-04 14:36:10 +01:00
cblgh 2a86b696fd add data for StoredEndpoint 2026-11-04 12:21:30 +01:00
cblgh 1131ed1c66 refactor(itcp): introduce simple logger 2026-11-04 12:17:32 +01:00
cblgh edda9242a6 misc: remove some logs 2026-11-03 13:33:14 +01:00
cblgh fb204a6d2b refactor(client): create itcp/dialer.go 2026-11-03 12:58:47 +01:00
cblgh 576aee3fc4 refactor: swap out wire protocol for http-based approach
this approach is based on what i've experimentally figured out in
https://git.coopcloud.tech/decentral1se/iroh-go/src/branch/main/examples/http-dialer

(thus the large diff X)

this is still wip but the basics work! this approach is more pragmatic
than previously.  it allows clients to send http queries over iroh to a
simple http server, instead of needing to implement a so-so
wire-protocol.
2026-11-03 11:53:09 +01:00
cblgh 9658eef4b6 clean up old comments 2026-10-31 15:05:48 +01:00
cblgh b25ed57686 refactor(stack): use new stack approach and improve docs for public methods 2026-10-31 14:56:57 +01:00
cblgh 4927d7581b fix(client): err out if -endpoint not present 2026-10-31 14:56:14 +01:00
cblgh f6d343cc38 refactor(stack): improve stack + example - main needs refactoring still 2026-10-30 13:26:10 +01:00
cblgh f5feaeffcd refactor: use stack instead of time-based system, vastly simplify tracker 2026-10-29 10:26:29 +01:00
cblgh 5949df32b1 refactor(stack): use static IsEmpty to check ret value 2026-10-29 09:20:31 +01:00
cblgh 0be552d98f stack: refactor to create + use Keyer interface
refactor Stack to "store an interface" i.e. items []Keyer -> interface Keyer { Key() string }
if storing []Keyer instead, i can store a struct that can contain any number of other fields.
2026-10-16 11:07:18 +02:00
cblgh be5a50cdcc back baby 2026-09-06 17:09:34 +02:00
cblgh a21ed7bc9a hiatus notice 2026-09-06 17:09:34 +02:00
cblgh 7bfd1fcf2c implement fixed-size evicting string stack data structure
this stack implementation has a fixed-size. new items are pushed to the
front and, if the capacity has been met, the last item gets evicted.  if
you push an item onto the stack that was already on the stack, this
"bumps" that item by merely moves the item to the front (as opposed to
allowing duplicates). the capacity is set at initialization.

the intended use case for this data structure is for the iroh-tracker to
only keep a fixed amount of topics and, per topic, a fixed amount of
peers. topics that are actively recalled get pushed to the front, and
peers within a topic that are seen often also get pushed to the front.

see examples/stack-example.go for how it can be used

eventually i'll refactor this to use just bytes instead as that is more
useful for the purpose of the tracker. this could also be an opportunity
to look into generics since string & byte are basically interchangeable.
2026-09-06 16:56:43 +02:00
cblgh b61dbb44c9 run prune on a timer and bump on repeat add from seen endpoints 2026-07-02 11:09:05 +02:00
cblgh ac2ef7f2ee hello now rejects incorrect read keys 2026-07-01 18:20:03 +02:00
cblgh 7a99ef3e16 improve client, now does its business and exits 2026-07-01 18:07:24 +02:00
cblgh 2272b739d1 tracker wip kinda works, client needs more love 2026-07-01 17:55:41 +02:00
cblgh bc644cec85 simple wire protocol structure implemented (no errors/0s)
TODO:
* decide on future response structure but maybe prefixing with the name is ok
* decide on error/nil values
* server: actually do things with the data sent to us by client
2026-06-30 21:47:17 +02:00
cblgh 5590e9423d refactor read/write bytes routines and use in client and server 2026-06-30 09:29:07 +02:00
cblgh db8d4b9ac9 remove polling 2026-06-29 16:41:26 +02:00
cblgh 3723193944 cycle testing secret + use V1/<type>/<rest> prefix 2026-06-29 16:24:55 +02:00
cblgh 1f18e85d85 improve wire protocol bytes reading 2026-06-29 14:58:30 +02:00
cblgh 7807bec835 simple client hello works 2026-06-28 23:06:25 +02:00
cblgh 2c3d7e5d41 gitignore 2026-06-28 15:54:37 +02:00
cblgh ac133bdaf0 init v1 data structures in place, wire protoocol in notes but not implemented 2026-06-28 15:52:39 +02:00