-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
[Blacklist] Opposite of FilterByClientIpPlugin #1123
Comments
@LetMeR00t Thanks a lot. Indeed, your best bet is copy paste the existing plugin and modify for your needs. Also, IIUC, you probably are thinking that plugins must be within You can keep your plugins private in your own repo. See skeleton app example for a starter template. |
Thank you @abhinavsingh for your quick answer. |
@LetMeR00t Sounds good. What we can do is:
For obvious reasons, an IP in blacklist will supersede values in whitelisted IP list. Wdyt? |
I think it's quite clear.
What is your opinion on that ? |
Sounds perfect to me. Defaults value will also preserve the current behavior. That will be awesome. Go for it please 🙏 |
Is it possible to enable login for a plugin ? I've tried to import the logging library but it seems not working or maybe it's because it's handled by one of the acceptor instead of the main script ? |
@LetMeR00t Yes there is an issue with logging in general. It works in some environment and Python versions and it silently fails on others. May be you could just print it out for now. I am sorry, fixing logging in a multiprocess environment will be another task in itself. We will likely use |
May you help me to distinguish "inputs_args" from "opts" for the "initialize" function of the main class Proxy ? |
To add Unfortunately, this is still tied into a core file and you will end up fiddling with that file. A better approach would be to keep using Let me know if it works or ain't clear still. TL;DR -- Try to use flags and args, not kwargs because it requires |
@LetMeR00t For core plugins it is ok to inject I started a PR to decouple Let me know. |
Thank you for your feedback. As you will see, I've made the first version of the PR: #1127 |
v2.4.2 is out now with these enhancements. Closing this now. |
Hello everyone,
First, thank you for this very complete library which brings a lot of features regarding proxy and also quite fast to understand how it works.
I plan to use this proxy in order to restrict the access to several ressources only to specific IPs.
I know you already have the plugin "FilterByClientIpPlugin" but this is used to blacklist specific IPs to access when I would like to do the opposite meaning allow the access to only a specific list of source IPs.
Is it something already implemented ?
If not, and if you are interested, I could copy/paste and adapt the "FilterByClientIpPlugin" to do so (by having a new dedicated plugin or by reviewing the logic behind this plugin (best option from my point of view).
Thank you
The text was updated successfully, but these errors were encountered: