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

Explicit proxy settings in the configuration files #62

Merged
merged 5 commits into from
Jan 20, 2020
Merged

Conversation

xoolive
Copy link
Owner

@xoolive xoolive commented Jan 19, 2020

All network accesses are made with the requests library (or the paramiko library for the Impala shell). Usually, if your environment variables are properly set, you should not encounter any particular proxy issue. However, there are always situations where it may help to manually force the proxy settings in the configuration file.

Edit your configuration file (you may find where it is located in traffic.config_file) and add the following section. Uncomment and edit options according to your network configuration.

## This sections contains all the specific options necessary to fit your
## network configuration (including proxy and ProxyCommand settings)
[network]

## input here the arguments you need to pass as is to requests
# http.proxy = http://proxy.company:8080
# https.proxy = http://proxy.company:8080
# http.proxy = socks5h://localhost:1234
# https.proxy = socks5h://localhost:1234

## input here the ProxyCommand you need to login to the Impala Shell
## WARNING:
##    Do not use %h and %p wildcards
##    Write data.opensky-network.org and 2230 explicitely instead
# ssh.proxycommand = ssh -W data.opensky-network.org:2230 proxy_ip:proxy_port
# ssh.proxycommand = connect.exe -H proxy_ip:proxy_port data.opensky-network.org 2230

@xoolive xoolive added the enhancement New feature or request label Jan 19, 2020
@xoolive xoolive self-assigned this Jan 19, 2020
@xoolive
Copy link
Owner Author

xoolive commented Jan 19, 2020

@espinielli could you please check whether this solves your issue?

You can use the following snippet to confirm your ProxyCommand works as expected:

from traffic.core.logging import loglevel
from traffic.data import opensky

loglevel('INFO')
opensky._connect()

@codecov-io
Copy link

codecov-io commented Jan 19, 2020

Codecov Report

Merging #62 into master will decrease coverage by 0.47%.
The diff coverage is 30.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   64.49%   64.01%   -0.48%     
==========================================
  Files          38       38              
  Lines        3830     3877      +47     
  Branches      750      756       +6     
==========================================
+ Hits         2470     2482      +12     
- Misses       1097     1131      +34     
- Partials      263      264       +1
Impacted Files Coverage Δ
traffic/data/basic/navaid.py 75.43% <ø> (-0.43%) ⬇️
traffic/data/basic/aircraft.py 75.75% <ø> (-0.37%) ⬇️
traffic/data/basic/runways.py 84.74% <ø> (-0.26%) ⬇️
traffic/data/eurocontrol/b2b/__init__.py 32.78% <0%> (ø) ⬆️
traffic/data/basic/airports.py 84.61% <100%> (-0.57%) ⬇️
traffic/data/adsb/opensky_impala.py 55.86% <100%> (+0.13%) ⬆️
traffic/data/basic/airways.py 89.83% <100%> (+0.17%) ⬆️
traffic/core/flightplan.py 61.88% <19.64%> (-10.98%) ⬇️
traffic/data/__init__.py 81.92% <66.66%> (+8.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02292dd...ea50939. Read the comment docs.

@xoolive xoolive marked this pull request as ready for review January 20, 2020 17:21
@xoolive xoolive merged commit c3cafc4 into master Jan 20, 2020
@xoolive xoolive deleted the pr-proxy branch January 20, 2020 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants