-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-app-zerotier: add a new luci app to manage zerotier vpn #5672
base: master
Are you sure you want to change the base?
Conversation
5130de9
to
fe20f6c
Compare
This doesn't work on a fresh install. |
fe20f6c
to
6cbe070
Compare
fixed and package successfully tested in a new vm |
6cbe070
to
b618564
Compare
I doubt they'll accept this PR if it's not in JavaScript. |
I only found out about that transition at the end. |
It seems that this pull request can be closed for now and once it will be converted to the JavaScript, it can be reopened, right? |
sure but I'm not going to do that. |
Is this still going on? CC @1715173329 |
Nah it's closed. https://github.com/immortalwrt/luci/tree/master/applications/luci-app-zerotier |
So is there any possibility that this package is in openwrt? |
52fbd57
to
025939e
Compare
I went through and collected/rewrote the history of this app from the following three repos @animegasan I'm going to try to get this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this correct?
I'm also new to github lately so sorry I can't help.
025939e
to
ab66d3f
Compare
As this is introduction of a new app, you should git squash the 44 commits into one. |
I'm planning on it |
@1715173329 do you want to take a look? |
applications/luci-app-zerotier/root/etc/hotplug.d/iface/40-zerotier
Outdated
Show resolved
Hide resolved
applications/luci-app-zerotier/root/etc/hotplug.d/iface/40-zerotier
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this (log to /root). Logs are ephemeral and belong in either /tmp
or /var/log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing it because it's not used anymore
|
||
nat_enable="$(uci get zerotier.sample_config.nat)" | ||
zt0="$(ifconfig | grep 'zt' | awk '{print $1}')" | ||
echo "${zt0}" > "/tmp/zt.nif" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file ever used?
This file just seems a bit messy. This one looks far more suitable. Consider using it.
Although, those init.d files belong in the zerotier package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is probably what needs to be done.
thanks for the link
"description": "Grant access to ZeroTier configuration", | ||
"read": { | ||
"file": { | ||
"/sbin/ifconfig": [ "exec" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revise to ip
as per above suggestion. Or remove entirely and use rpcd.
for i in ${zt0} | ||
do | ||
ip_segment="$(ip route | grep "dev $i proto kernel" | awk '{print $1}')" | ||
echo 'iifname '$i' counter accept comment "!fw4: Zerotier allow inbound forward '$i'"' >> /usr/share/nftables.d/chain-pre/forward/zerotier.nft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we do something like this?:
https://github.com/zhengmz/luci-app-zerotier/blob/0745c07a76ee472d0ab9fcec36d50f26638b6558/root/etc/init.d/luci-zerotier#L58C6-L62C103
|
||
return view.extend({ | ||
load: function() { | ||
return fs.exec('/sbin/ifconfig').then(function(res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revise to an rpcd or ucode script. We definitely should not be parsing ifconfig
output to display info here.
A ucode script is better suited to this. See an example here. Might this be the reason for the jsonfilter
dep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applications/luci-app-zerotier/htdocs/luci-static/resources/view/zerotier/base.js
Outdated
Show resolved
Hide resolved
@systemcrash Thanks for the suggestions. I'm soon starting university again so I might not get to it for a couple of months |
d8d7455
to
c2b924f
Compare
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Based off of https://github.com/coolsnowwolf/lede/tree/master/package/lean/luci-app-zerotier - without the interface code and scripts for allowing NAT access to the local lan. - added missing btn class to Zerotier.com button which fixes button style in the openwrt2020 theme. - removed html from Zerotier.com button translation. - add es translation and template from https://github.com/openwrtdiy/openwrt-ipk/tree/main/luci-app-zerotier - regenerated translation template from source - normalised translation files - add luci-compat to package dependencies Signed-off-by: Andrew Innes <andrew.c12@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This is the prevue of the zerotier package
c2b924f
to
1e105a5
Compare
@andrewc12: Have you progressed on this PR? |
Nope |
Based on https://github.com/coolsnowwolf/lede/tree/master/package/lean/luci-app-zerotier
Signed-off-by: Andrew Innes andrew.c12@gmail.com