Open abhinavsingh opened 2 years ago
Hi,
Is there any update to this or more details regarding implementing the workaround for the skeleton app example? https://github.com/abhinavsingh/proxy.py/tree/develop/skeleton
Hi,
Is there any update to this or more details regarding implementing the workaround for the skeleton app example? https://github.com/abhinavsingh/proxy.py/tree/develop/skeleton
Figured it out.
def run_proxy() -> None:
with proxy.Proxy(
enable_web_server=True,
port=9000,
input_args=["--plugin", "<plugin name>"]
) as _:
proxy.sleep_loop()
This then correctly loads the plugin and resolves the plugins flags and their default values. I would imagine for any utilisation of the flags (outside of default) you'd probably need to add those to the input_args
as well
Describe the bug
DOES NOT WORK
proxy.Proxy(plugins=["...", "...",])
will not result in discovering custom flags defined in the external plugins.FOLLOWING 2 SCENARIO WORKS
proxy.Plugin(*("--plugin", "...", "--plugin", "..."))
or
proxy --plugin ....
FIX
args.plugins
must be resolved prior to callingFlags.parse
for custom flag discovery.