Skip to content

Replace default DHT nodes w/ Trac ones #26

Open

Description

@TracSystems

Replace default DHT nodes w/ Trac ones and benchmark the connectivity between nodes in comparison to the built-in ones.

Activity

  1. eL1x00r commented on Feb 19, 2024

    @eL1x00r
    Contributor

    Example usage with new DHT servers on google cloud:

    export default class TracManager {
      /**
       * Creates an instance of TracManager.
       * Sets up Corestore and Hyperswarm and prepares for data synchronization.
       */
      /**
       * @property {TapProtocol} tapProtocol - Instance of TapProtocol to manage TAP interactions and data streams.
       */
      tapProtocol;
      /**
       * @property {RestModule} restServer - Instance of RestModule for REST API access.
       */
      restServer;
      constructor() {
        this.isConnected = false;
        this.store = new Corestore("./tapstore");
        this.dht = new HyperDHT({
          // Optionally overwrite the default bootstrap servers, just need to be an array of any known dht node(s)
          // Defaults to ['node1.hyperdht.org:49737', 'node2.hyperdht.org:49737', 'node3.hyperdht.org:49737']
          bootstrap: ['34.69.114.195:34481', '34.141.187.40:38126', '34.126.94.90:33995']
        });
        this.swarm = new Hyperswarm({dht: this.dht});
        this.bee = null;
        this.tapProtocol = new TapProtocol(this);
    
        goodbye(() => {
          this.swarm.destroy();
        });
      }
  2. eL1x00r commented on Feb 19, 2024

    @eL1x00r
    Contributor

    us-central started @ 34.69.114.195:34481

  3. eL1x00r commented on Feb 19, 2024

    @eL1x00r
    Contributor

    europe-west started @ 34.141.187.40:38126

  4. eL1x00r commented on Feb 19, 2024

    @eL1x00r
    Contributor

    asia-southeast started @ 34.126.94.90:33995

    (note that all three ports changed)

  5. self-assigned this
    on Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions