-
Notifications
You must be signed in to change notification settings - Fork 3.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
antiblock: add new package #25694
base: master
Are you sure you want to change the base?
antiblock: add new package #25694
Conversation
@1715173329 hi, do you know why the pipeline is not started here? It says "2 workflows awaiting approval " here. Can you help? |
|
"The hosted runner: GitHub Actions 17 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error." How can I start again? |
@karen07 I do not think you need to run again. Your package has likely nothing to do with the problem (my pipeline run also tend to be red). Let's wait for a developer. |
@1715173329 what is the best way to upload changes so that there is only one commit in the branch? |
Just use amend + force push |
As @1715173329 mentioned. Use |
e4dc527
to
5e5941c
Compare
@1715173329 Made changes. |
@1715173329 What else can I fix? |
Please add the description to commit message as well, otherwise LGTM. |
e6f0eab
to
80dcfba
Compare
Added. |
@1715173329 All checks have passed. |
After that please allow a few days for other maintainers to leave reviews (if any). |
AntiBlock program proxies DNS requests. The IP addresses of the specified domains are added to the routing table for routing through the specified interface. Signed-off-by: Khachatryan Karen <[email protected]>
80dcfba
to
33f35b1
Compare
Well) |
@mwarning What do you think about the code? |
procd_set_param command "/usr/bin/antiblock" | ||
procd_set_param stdout 1 | ||
|
||
if [[ "$log" != "" ]]; then |
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 would replace these kind of contructs with if [ -n "$log" ]; then
. it is less specific shell code. But it is not important.
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.
Yes, [ -n ... ]
is better
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'll fix it.
|
||
procd_close_instance | ||
|
||
uci commit |
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.
This writes all changes to all configuration files to the flash on every start of the application.
Please don't do that. :)
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.
oh, right, that needs to be fixed)
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.
Just remove the line.
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.
uci -q set dhcp.$id.noresolv="1"
uci -q delete dhcp.$id.server
uci -q add_list dhcp.$id.server="$listen_IP#$listen_port"
This line is needed to apply the dhcp changes. I want to change to uci commit dhcp
. Or will the changes apply themselves?
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.
You do not need to store/commit the setting if you modify the dhcp settings and restart dnsmasq afterwards anyway.
But in general it is not a good idea to modify and save other programs configuration files.
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.
Or [ -n "$(uci -q changes dhcp)" ] && uci commit dhcp
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.
But in general it is not a good idea to modify and save other programs configuration files.
I agree, especially it could break existing user configurations. It simply removes the server but never restored.
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 have seen that other services also modify configurations, for example https-dns-proxy
. I took it as an example. For my program to work, it is necessary to redirect DNS traffic to it. I will fix the recovery of deleted parameters.
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.
Well, I write what I think. It is no law :)
config_load dhcp | ||
config_foreach dnsmasq_walk_del dnsmasq | ||
|
||
uci commit |
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 remove that line
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'll correct it, as discussed above.
VPN_name="" | ||
|
||
config_load antiblock | ||
config_foreach antiblock_walk_add antiblock |
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.
If you are only interested in in the first or last section, then you do not need config_foreach. But I would look up how to do that.
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.
It seems to have access via @, I'll look for it.
Maintainer: me
Compile tested: ASUS RT-AX59U 23.05.5, ASUS RT-AX53U 23.05.5, OpenWrt x86
Run tested: ASUS RT-AX59U 23.05.5, ASUS RT-AX53U 23.05.5, OpenWrt x86
Description:
AntiBlock program proxies DNS requests. The IP addresses of the specified domains are added to the routing table for routing through the specified interface.