-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
examples/block-ip: show how to block IP addresses #15748
Conversation
Is |
It adds complexity to apply and remember different rules for Isn't it simpler to add |
I believe so. We encourage use of static for local functions anyway. |
@vszakats do you have any suggestion for the failing amiga CI job? Does it not have a working inet ntop/pton? I see in your commit that recently created the job that: inet_ntop, inet_pton: fix using it for AmigaOS. cmake detects them, and they did not compile with AmigaOS. Should this example be excluded from that platform? |
These functions exist on AmigaOS3, but they possibly require Sounds overkill for a standalone example. I think excluding it is a reasonable solution. |
I disabled it for Amiga by defining an alternate main in the example for I had considered instead removing block_ip, when amiga host, from the check_PROGRAMS list after it's imported by CMakeLists.txt and Makefile.am. In cmake it would be easy |
Agreed, it sounds messy on the build-level. I think it's perfectly fine to handle it in C. Somebody may compile |
- Show how CURLOPT_OPENSOCKETFUNCTION can be used to block IP addresses. This is a new example that demonstrates IP blocking. Ref: curl#15710 (reply in thread) Closes curl#15748
This is a new example that demonstrates IP blocking.
Ref: #15710 (reply in thread)
Closes #xxxx