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

Enable Group Selection #41

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

akutta
Copy link

@akutta akutta commented Nov 26, 2020

Allow users to specify the preferred type of servers through environment variables:

  • "p2p"
  • "double vpn"
  • "onion over vpn"
  • "dedicated ip"
  • "standard vpn"
  • "obfuscated"

@akutta
Copy link
Author

akutta commented Nov 26, 2020

I noticed when I used the standard recommendations, I would have no control over which types of servers I could connect to. Now if users want to use a P2P / Onion / etc server, it is selectable.

I tried to keep to the existing standards within the file ( design / spacing / etc ). If I missed something or other feedback, feel free to respond.

Copy link
Owner

@Joentje Joentje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for you contribution :)! I really like it, this is one of the features that is currently missing. I added some comments. Let me know what you think.

I just tested it, seems that it not completely working. When I select for example, double vpn. I would expect a connection with for example with nl-uk4.nordvpn.com. Can you confirm it works for you? Maybe there is a need of more logging in general. I will do some testing later.

Dockerfile Outdated Show resolved Hide resolved
app/ovpn/servers_recommendations.sh Outdated Show resolved Hide resolved
@akutta
Copy link
Author

akutta commented Nov 30, 2020

the issue came during some refactoring. the filter keyword was wrong.

Concerns addressed.

@Joentje
Copy link
Owner

Joentje commented Nov 30, 2020

I'm now getting an error: jq: error (at <stdin>:0): Cannot iterate over number (0). Can you check?

resolve bug on fetching with server type filter. switch to server_type from groups to match nordvpn front end.

resolve typo

fix typo
@akutta akutta force-pushed the akutta/enable-group-selection branch from 2b1c2d2 to 814b7e1 Compare November 30, 2020 19:36
@akutta
Copy link
Author

akutta commented Nov 30, 2020

try again. What I pushed up to git wasn't the proper set of changes.

@Joentje
Copy link
Owner

Joentje commented Dec 2, 2020

Seems to be working 👍 . The only two things I can find right now is:

  1. When you set a for example: COUNTRY=fr, with "SERVER_TYPE=double vpn", I'm in the Netherlands, then it will still pick the default (NL, not FR). FR has Double vpn available. I think there is a filter missing. Can you have a look?

  2. When a country does not have the type available, it will through an error: Options error: In [CMD-LINE]:1: Error opening configuration file: null.tcp.ovpn. I thinks this is more an error in general, when it is null or when type is not available. We can create a separate issue for that once this is merged.

@akutta
Copy link
Author

akutta commented Dec 2, 2020

Hadn't tested the first scenario. Probably should have. I'm sure it's just an issue with how the parameters are being appended together. Might have to refactor that to be more robust.

@akutta
Copy link
Author

akutta commented Dec 16, 2020

FILTERS=$( jq -c -n \
     --argjson server_type $(($SERVER_TYPE_CODE)) \
     --argjson country_code $(($COUNTRY_CODE)) \
     '{ server_groups: [$server_type], country_id: $country_code }')

Attempted to use jq to build the filter more dynamically, but couldn't get curl/wget to then respect the filter properly. Perhaps you could have more luck if you decide to try.

@Joentje
Copy link
Owner

Joentje commented Dec 16, 2020

I will give it a try

@Joentje Joentje mentioned this pull request Dec 31, 2020
@dmatora
Copy link

dmatora commented Oct 13, 2021

so is there currently a way to enable obfuscate?
there are countries where nordvpn only works with obfuscation

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

Successfully merging this pull request may close these issues.

None yet

3 participants