Coder Social home page Coder Social logo

Comments (9)

mwarning avatar mwarning commented on May 22, 2024

Sure, that can be done and isn't much work. But keep in mind that writing into the flash might degrade the chip. /var and /tmp are mounted into the RAM.
Wouldn't it be possible to keep all static data in /etc/config/zerotier?

from zerotier-openwrt.

mwarning avatar mwarning commented on May 22, 2024

What information need to be stored for the network controller? Is the network controller a suitable task for a openwrt router?

from zerotier-openwrt.

boschkundendienst avatar boschkundendienst commented on May 22, 2024

I think the router can handle it. Having your own controller (currently only configurable via API using Json requests) has the benefit, that you would not need an account at zerotier.com. You would only use their backend as a kind of phonebook like DNS. All members of your network (you host via the controller) will use the information from the controller to connect or use the controller as router (and not zerotier central). - So result will be higher speeds and lower latency.
This is nearly the same as they offer with their device they sell but without the wunderful graphical interface. Think about it as having my.zerotier.com on your router but only configurable via json requests against the API authenticated by your API-secret (also lying arround in the config dir).

Let me take a look into the controller stuff when I have time and give more feedback.

The most important directory is

/<configdir>/controller.d/

afaik.

Documentation can be found here:
https://github.com/zerotier/ZeroTierOne/tree/master/controller

Hint:
When following the documentation when they talk about POST to /controller/network/##########______ you have to fill in the clientID of the router for the # and at the end 6 x _.
Then a network is created in the format

All future request then have to use the network ID that has been created.

And this is then stored in the controller configuration which we need reboot resistent.

from zerotier-openwrt.

boschkundendienst avatar boschkundendienst commented on May 22, 2024

>Wouldn't it be possible to keep all static data in /etc/config/zerotier?
This might be possible if we could re-create the ZeroTier working folder with all necessary files containing the secrets and configuration (also for the controller) from config file. But afaik now they are not all just text files some are small databases I think.
Of course this would be better for keeping the router alive for a long time not degrading the chip.

from zerotier-openwrt.

mwarning avatar mwarning commented on May 22, 2024

I have implemented a few changes to make the configuration path configurable: d82d879
If it works, we can submit it to https://github.com/openwrt/packages/.

from zerotier-openwrt.

boschkundendienst avatar boschkundendienst commented on May 22, 2024

Changes look good, could not test, yet. We should keep in mind, when someone has changed the configuration folder also zerotier-cli needs the path as parameter.

-D<path>                - ZeroTier home path for parameter auto-detect

I am not that familiar with LEDE. If it would be possible, when a custom path is used to automatically alias zerotier-cli as zerotier-clie -D`, that would be great!

from zerotier-openwrt.

mwarning avatar mwarning commented on May 22, 2024

That is why I make a symbolic link from the /var/lib/zerotier-one to the custom path. Works for me.

from zerotier-openwrt.

boschkundendienst avatar boschkundendienst commented on May 22, 2024

I can confirm the init script works as expected after adding

option config_path '<custom configuration path>'

to /etc/config/zerotier

Thanks for that one!

from zerotier-openwrt.

nikito7 avatar nikito7 commented on May 22, 2024

option config_path '/etc/zerotier'

Error if folder dont exist

from zerotier-openwrt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.