iroh icon indicating copy to clipboard operation
iroh copied to clipboard

Documentation Missing: No example of setting listening port in configuration documentation

Open haltingstate opened this issue 1 year ago • 2 comments

There is no example configuration file.

It is currently impossible to change or set the listening ports.

  • there is no default configuration file created, that could be editted
  • there is no example of a default configuration file that could be copy/pasted and edited, in the documentation

Therefore it is important for configuration files to be used as they are undocumented and have no example and there is absolutely no way for users to set listening ip/ports for iroh.


See:

  • https://iroh.computer/docs/reference/config

haltingstate avatar Jul 14 '24 23:07 haltingstate

The main documentation for the library lives on docs.rs currently. Binding to a non default port is documented here: https://docs.rs/iroh/latest/iroh/node/struct.Builder.html#method.bind_port

dignifiedquire avatar Jul 15 '24 08:07 dignifiedquire

The main documentation for the library lives on docs.rs currently. Binding to a non default port is documented here: https://docs.rs/iroh/latest/iroh/node/struct.Builder.html#method.bind_port

Can we update the documentation here

  • https://iroh.computer/docs/reference/config

To include an example of a configuration file where the ports are configured?

I think modifying the source code in rust, might be too difficult for people deploying from the binary.

haltingstate avatar Jul 15 '24 21:07 haltingstate

the iroh API is wildly different than what it was when this issue was created. However, for posterity, if you want to specific a specific listening port for your iroh::Endpoint, use the iroh::endpoint::Builder methods bind_addr_v4 and bing_addr_v6 https://docs.rs/iroh/latest/iroh/endpoint/struct.Builder.html

ramfox avatar Sep 22 '25 19:09 ramfox