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

Add the fwd functionality to the API #1577

Closed
wants to merge 8 commits into from

Conversation

Senyoret1
Copy link
Contributor

Did you run make format && make check?
Can’t from my dev enviroment, will fix any problem form another machine if a problem appears.

Changes:

  • Several new endpoints were addded to the Hypervisor API, to be able to access the functionality of the skywire-cli fwd and skywire-cli rev commands. This will allow to access the functionalities from the UI.

How to test this PR:
Call the API endpoints, they should work as expected.

NOTE: during testing using Postman, when the POST /visors/{pk}/rev endpoint was called to create a connection, Postman it always reported that the server did not respond, but the connection was in fact created, which could be checked by calling GET /visors/{pk}/rev. This could mean that the operation for creating the connection to the remote port is slow and that there is a timeout in the API that causes problems with that.

@Senyoret1
Copy link
Contributor Author

In the last commit I added an additional endpoint: POST /visors/{pk}/ping-visor. This takes a long time to process and when finishes, the response in curl is curl: (52) Empty reply from server, so it has the same problem as POST /visors/{pk}/rev and now is more cleat that there is a timeout issue. The thing is that in hypervisor.go the timeout is suposed to be 30 secs, so we have to check were the problem really is.

@Senyoret1
Copy link
Contributor Author

The last commit increases the write timeout for the Hypervisor API, to avoid problems with some of the new endpoints, which can be slow to respong. It also uses a single constant to define the write timeout in the 2 files were the timeout is set, to make the code easier to maintain.

@jdknives jdknives deleted the branch skycoin:develop June 1, 2023 13:03
@jdknives jdknives closed this Jun 1, 2023
@Senyoret1 Senyoret1 reopened this Jun 4, 2023
@Senyoret1
Copy link
Contributor Author

The last commit adds info about the local ports shared with FWD and the remote ports connected with REV to the summary API endpoint.

@Senyoret1
Copy link
Contributor Author

The last commit adds an endpoint for turning off the visor.

@0pcom
Copy link
Collaborator

0pcom commented Mar 16, 2024

@0pcom 0pcom closed this Mar 16, 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.

3 participants