{"id":23138340,"url":"https://github.com/encodeous/nylon","last_synced_at":"2025-04-04T09:44:11.760Z","repository":{"id":273132282,"uuid":"899062987","full_name":"encodeous/nylon","owner":"encodeous","description":"go nylon!","archived":false,"fork":false,"pushed_at":"2025-03-22T16:23:33.000Z","size":4285,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T17:28:02.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/encodeous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T14:55:27.000Z","updated_at":"2025-03-22T16:23:36.000Z","dependencies_parsed_at":"2025-02-17T09:20:38.810Z","dependency_job_id":"3deb12bd-8bd0-44ef-aa8b-283e2af9b8a4","html_url":"https://github.com/encodeous/nylon","commit_stats":null,"previous_names":["encodeous/nylon-go"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encodeous%2Fnylon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encodeous%2Fnylon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encodeous%2Fnylon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encodeous%2Fnylon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encodeous","download_url":"https://codeload.github.com/encodeous/nylon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157133,"owners_count":20893210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T13:10:41.589Z","updated_at":"2025-04-04T09:44:11.752Z","avatar_url":"https://github.com/encodeous.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Nylon\n\nNylon is a utility used to build durable, fault-tolerant and performant mesh networks. It employs a specially tuned distance-vector routing algorithm, derived from [Babel](https://datatracker.ietf.org/doc/html/rfc8966). Nylon is built as an extension to WireGuard, and remains backwards compatible with existing clients.\n\n# Getting Started\n\nNylon is deployed as a single binary, it is up to you how you want to run it.\n\n## Simple Network\n\nHere, we will set up a simple network consisting of 5 nodes. This will be a guided set up process. You can also choose to set up the network manually using writing the config file manually, and generating key pairs using `./nylon key -g` or `wg genkey`. You can see the configuration file template in this repo, under `sample-node.yaml` and `sample-central.yaml`\n\n```mermaid\ngraph RL\n    public --- |2| charlie\n    public --- |2| alice\n    eve --- |1| bob\n    public --- |5| eve\n    alice --- |1| bob\n```\n\n*Here, the number on the edges represent some network Metric, usually latency.*\n\nNotice that the network does not need to be fully connected for Nylon function!\n\n### Installing\n\n... TBA\n\n### Setting up the network\n\nOn every node, run `./nylon new \u003cnode-name\u003e`. This will create the file `node.yaml`. The output of this command is the public key of the node. Take note of this, as we will need paste it into the `pubkey` field of every node.\n\nNow, on any node, create the file `central.yaml`. It should look like this:\n```yaml\nrouters:\n  - id: alice\n    pubkey: afIhSoe95Fr5plativMyZL3QZslSHOBl8GWIKeqw7kg=\n    prefixes:\n      - 10.0.0.1/32\n  - id: bob\n    pubkey: 4GfHHSyVpXc+wkbjyIIONERa6Xf5EafB0nVGZLf2r2o=\n    prefixes:\n      - 10.0.0.2/32\n    endpoints:\n      - '192.168.1.1:57175'\n  - id: eve\n    pubkey: 2mXTTD+FYdtJm/v1vSHz8qimvCucjW9vY+nLYacXJFE=\n    prefixes:\n      - 10.0.0.3/32\n  - id: public\n    pubkey: dJcUE1qnXCQ5x8pMhFb/MZab7YrBaaHcrgfbmQI0MW4=\n    prefixes:\n      - 10.0.0.4/32\n    endpoints:\n      - '123.123.123.123:57175' # nylon supports multiple endpoints, picking the best endpoint dynamically\n      - '123.123.123.124:57175'\n  - id: charlie\n    pubkey: WcCkKijU0brYnRzxk867HTDyYFf/cqiKTTOLSxtWoFc=\n    prefixes:\n      - 10.0.0.5/32\ngraph:\n  - InternetAccess = charlie, eve, alice # groups charlie, eve, and alice which all have internet access together\n  - public, InternetAccess # connects the group InternetAccess with the node public\n  - bob, eve\n  - bob, alice\n```\n\nYou can now sync this file across all the nodes using `rsync` or any other method you prefer. Nylon comes with a built-in way to distribute config automatically, but you will need to set the network up first.\n\nNotice that we didn't need to specify the endpoints for every node, and that is because we are using one of the key features of Nylon, Dynamic Endpoints. Sometimes a computer doesn't have an accessible IP, but it can still reach a computer that does. Nylon will still try to reach out and connect, picking the best and most reliable path. As long as there exists a valid path between two nodes, Nylon will take the optimal one.\n\n### Running the network\n\nBefore running Nylon, make sure to open UDP port `57175` so that Nylon can communicate, and enable IP Forwarding on your respective platform.\n\nWithout further to do, simply run `./nylon run` (more privileges may be required).\n\nHappy Networking!\n\n### Mobile Clients\n\nNylon is designed to run on a computer or server. To connect your Phone or Tablet to your Nylon network, you can use any vanilla WireGuard client. To add a client to your network, run `./nylon client \u003cgateway-id\u003e`. Make sure the gateway's endpoint(s) can be reached by the Mobile Client you are configuring this for.\n\nThis command will generate a WireGuard configuration file and a Public Key. Make sure to add the Public Key and desired client address to the Central Configuration file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencodeous%2Fnylon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencodeous%2Fnylon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencodeous%2Fnylon/lists"}