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

feature request: add progress bar for blockcheck.sh #1141

Closed
pohmelie opened this issue Feb 4, 2025 · 11 comments
Closed

feature request: add progress bar for blockcheck.sh #1141

pohmelie opened this issue Feb 4, 2025 · 11 comments

Comments

@pohmelie
Copy link

pohmelie commented Feb 4, 2025

I'm watching some probes for a hour and I don't know how long will it goes.

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

It's not easy.

Check process depends on previous results.
For example, it will not test "fake,split" if just "fake" works.

@pohmelie
Copy link
Author

pohmelie commented Feb 5, 2025

If you can calculate total possible number of requests, then you can make progress on this. No need to be very precise it just for user to understand is it a minute or is it an hour. If some requests are skipped progress just will be faster.

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

Theoretically it's possible but if you look at pktws_check_domain_http_bypass function you will see how many conditions and branches are there.
For every code I need to maintain another code that counts how many tests first code launches.
And keep them synchronized after any change.

I dont think this complexity worth it

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

If you want to speed up execution there're some possibilities

SKIP_TPWS=1 CURL_MAX_TIME=1 PARALLEL=1 ./blockcheck.sh

If you set >1 attempts PARALLEL launches many attempts at once (can trigger ddos protection)

@pohmelie
Copy link
Author

pohmelie commented Feb 5, 2025

This problem is known well. You just need to collect all tasks descriptions at first step, and then iterate over it evaluating them. So, before actual requests you will know the total amount of requests

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

Yes. But it's not enough to count total maximum tests.
I need to profile every branch how many max tests if would launch. So if a branch is not executed I know by what value to increase current test counter.

@pohmelie
Copy link
Author

pohmelie commented Feb 5, 2025

Hm, I don't get it. You can't without any requests build a total list of required requests, is it?

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

I can dry-run it with silent fail and count total possible maximum that would be with force mode..
But I need to know current test number at every test to display it correctly.
This is not trivial. If all test would execute I just increase counter every test.
But if not ?

@pohmelie
Copy link
Author

pohmelie commented Feb 5, 2025

I mean, you can assume that every possible test will be evaluated and start from this count. Then, when you decide to skip test, you will mark this test as done in progress.

@bol-van
Copy link
Owner

bol-van commented Feb 5, 2025

Logic of test skipping is not straightforward.
See the function I mentioned.

@pohmelie
Copy link
Author

pohmelie commented Feb 5, 2025

Yes, I understand that in current implementation this can be hard or impossible to implement and probe code needs to be refactored.

@bol-van bol-van closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2025
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

No branches or pull requests

2 participants