Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karen07
Copy link

@karen07 karen07 commented Jan 7, 2025

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.

net/antiblock/test.sh Outdated Show resolved Hide resolved
@mwarning
Copy link
Contributor

mwarning commented Jan 8, 2025

@1715173329 hi, do you know why the pipeline is not started here? It says "2 workflows awaiting approval " here. Can you help?

@1715173329
Copy link
Member

1715173329 commented Jan 9, 2025

@1715173329 hi, do you know why the pipeline is not started here? It says "2 workflows awaiting approval " here.

fyi https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks

By default, all first-time contributors require approval to run workflows.

@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@1715173329 hi, do you know why the pipeline is not started here? It says "2 workflows awaiting approval " here.

fyi https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks

By default, all first-time contributors require approval to run workflows.

"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?

@mwarning
Copy link
Contributor

mwarning commented Jan 9, 2025

@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.

net/antiblock/Makefile Outdated Show resolved Hide resolved
net/antiblock/Makefile Outdated Show resolved Hide resolved
net/antiblock/files/etc/init.d/antiblock Outdated Show resolved Hide resolved
net/antiblock/files/etc/init.d/antiblock Outdated Show resolved Hide resolved
net/antiblock/files/etc/init.d/antiblock Show resolved Hide resolved
@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@1715173329 what is the best way to upload changes so that there is only one commit in the branch?

@1715173329
Copy link
Member

Just use amend + force push

@mwarning
Copy link
Contributor

mwarning commented Jan 9, 2025

@1715173329 what is the best way to upload changes so that there is only one commit in the branch?

As @1715173329 mentioned. Use git add Makefile --amend and then git push --force.

@karen07 karen07 force-pushed the add-antiblock-new branch from e4dc527 to 5e5941c Compare January 9, 2025 12:39
@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@1715173329 Made changes.

@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@1715173329 What else can I fix?

@1715173329
Copy link
Member

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.

Please add the description to commit message as well, otherwise LGTM.

@karen07 karen07 force-pushed the add-antiblock-new branch 2 times, most recently from e6f0eab to 80dcfba Compare January 9, 2025 15:48
@karen07
Copy link
Author

karen07 commented Jan 9, 2025

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.

Please add the description to commit message as well, otherwise LGTM.

Added.

@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@1715173329 All checks have passed.

@1715173329
Copy link
Member

please do not write description just after the commit title (subject), instead, leave a new blank line, then add the description (commit message), and wrap a new line for every 70 chars as well.

it should be look like this:
image

@1715173329
Copy link
Member

1715173329 commented Jan 9, 2025

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]>
@karen07 karen07 force-pushed the add-antiblock-new branch from 80dcfba to 33f35b1 Compare January 9, 2025 16:40
@karen07
Copy link
Author

karen07 commented Jan 9, 2025

please do not write description just after the commit title (subject), instead, leave a new blank line, then add the description (commit message), and wrap a new line for every 70 chars as well.

it should be look like this: image

Fixed.

@karen07
Copy link
Author

karen07 commented Jan 9, 2025

After that please allow a few days for other maintainers to leave reviews (if any).

Well)

@karen07
Copy link
Author

karen07 commented Jan 9, 2025

@mwarning What do you think about the code?

procd_set_param command "/usr/bin/antiblock"
procd_set_param stdout 1

if [[ "$log" != "" ]]; then
Copy link
Contributor

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, [ -n ... ] is better

Copy link
Author

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
Copy link
Contributor

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. :)

Copy link
Author

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the line.

Copy link
Author

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?

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Member

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.

Copy link
Author

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.

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove that line

Copy link
Author

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
Copy link
Contributor

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.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants