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

Provider checker API #6047

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

Provider checker API #6047

wants to merge 3 commits into from

Conversation

Zensey
Copy link
Contributor

@Zensey Zensey commented May 14, 2024

VPN 2.0 monitoring.

Summry of task:
Essentially, the program should get the connection parameters from the API, raise the connection and make sure that it works.
Establishing a VPN connection to wireguard must be done through the wg+gvisor combination, because raising a real network interface is not convenient especially in could environments, so a VPN connection that works entirely from code would be very useful.

Implementation notes:
Check of provider's functioning is done by requesting to http://1.1.1.1

Example of use
.\build\myst\myst.exe --provchecker --log-level=error daemon

Api
http://localhost:4050/prov-checker?id=0x020dd683990895d0f81a47702161f1d29d209976

Response:
{"status":true,"error":null,"provider_id":"0x020dd683990895d0f81a47702161f1d29d209976"}

Batch mode (check many providers):

curl.exe -vvv -H "Content-Type: application/json" \
  http://localhost:5050/prov-checker-batch \
  -d '["0x020dd683990895d0f81a47702161f1d29d209976","0x1a52807858619c4acb2a075b659a86dbe459bc98"]'

Response:

[
  {
    "status": false,
    "error": "err_connect",
    "provider_id": "0x020dd683990895d0f81a47702161f1d29d209976"
  },
  {
    "status": true,
    "error": null,
    "provider_id": "0x1a52807858619c4acb2a075b659a86dbe459bc98"
  }
]

@Zensey Zensey self-assigned this May 14, 2024
@Zensey Zensey force-pushed the feature/provider-checker branch 9 times, most recently from 782e1ed to a464dbf Compare May 14, 2024 17:19
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 771 lines in your changes are missing coverage. Please review.

Project coverage is 36.60%. Comparing base (4a517cd) to head (cc91377).
Report is 73 commits behind head on master.

Files Patch % Lines
core/connection/manager-diag.go 0.00% 566 Missing ⚠️
tequilapi/endpoints/connection-diag.go 0.00% 191 Missing ⚠️
core/connection/pinger.go 0.00% 10 Missing ⚠️
config/flags_node.go 0.00% 2 Missing ⚠️
services/wireguard/connection/connection.go 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6047      +/-   ##
==========================================
- Coverage   37.90%   36.60%   -1.31%     
==========================================
  Files         371      374       +3     
  Lines       20665    21486     +821     
==========================================
+ Hits         7833     7864      +31     
- Misses      12054    12839     +785     
- Partials      778      783       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Zensey Zensey force-pushed the feature/provider-checker branch 8 times, most recently from 3199837 to 8aad078 Compare May 23, 2024 22:24
Signed-off-by: Anton Litvinov <[email protected]>
@Zensey Zensey force-pushed the feature/provider-checker branch 2 times, most recently from bc72c13 to ef81c6a Compare May 24, 2024 09:02
@Zensey Zensey changed the title Provider checker mode Provider checker API Jun 4, 2024
Copy link

stale bot commented Jun 22, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 22, 2024
@stale stale bot removed the stale label Jul 1, 2024
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

2 participants