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

fn_joe_sandbox_analysis - app_config proxy settings not applied #79

Open
fhubaer opened this issue Sep 23, 2021 · 0 comments
Open

fn_joe_sandbox_analysis - app_config proxy settings not applied #79

fhubaer opened this issue Sep 23, 2021 · 0 comments

Comments

@fhubaer
Copy link

fhubaer commented Sep 23, 2021

Description

  • When configuring a proxy only via the app_config jsb_* keys, the proxy is not used.

Describe How to Reproduce

  • Configure proxies in the app_config.
  • Only set the proxy in the apps jsb_http_proxy and jsb_https_proxy keys, not globally.
  • Block outgoing connections from the AppHost to *:443.
  • Run a configuration test, recieve an error and discover that the server-alive-check fails.
  • Watch your AppHost connections with tcpdump or your firewall logs and discover that the app attempts direct connections instead of using the proxy.

Possible cause

See the proxy selection code in

    try:
        proxies = get_proxies(opts, app_configs)
        if (HTTP_PROXY) and (len(proxies) == 0):
            proxies["http"] = HTTP_PROXY
                
        if (HTTPS_PROXY) and (len(proxies) == 0):
            proxies["https"] = HTTPS_PROXY
                
        if (len(proxies) == 0):
            proxies = None
    except Exception as proxy_error:
        proxies = None
  • I guess get_proxies(...) returns None in my scenario, len(proxies) raises TypeError and the jsb_* values are never set.
  • Furthermore, wouldn't this code only set the jsb_* values when there are no global proxies configured? Shouldn't it be the opposite?
  • And last, wouldn't this only ever set the proxy for one protocol?
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

1 participant