This commit is contained in:
mr
2026-01-27 15:49:57 +01:00
parent 5a94504abb
commit f7f9d722bd
4 changed files with 27 additions and 4 deletions

View File

@@ -55,7 +55,12 @@ func Init(ctx context.Context) (*DHTService, error) {
if err != nil {
return nil, err
}
psk, err := LoadPSKFromFile()
if err != nil {
return nil, err
}
h, err := libp2p.New(
libp2p.PrivateNetwork(psk),
libp2p.Identity(priv),
libp2p.ListenAddrStrings(
fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", conf.GetConfig().DHTEndpointPort),