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

test #1

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

test #1

wants to merge 155 commits into from

Conversation

0pcom
Copy link
Owner

@0pcom 0pcom commented Jul 13, 2023

Fixes #

Changes:

How to test this PR:

0pcom and others added 30 commits June 22, 2024 12:46
* do not serve redundantly on local port with dmsg web srv

* split up dmsgweb source code into multiple files ; make dmsg web srv able to proxy multiple ports over dmsg

* log fatal error if same number of dmsg ports and local ports are not specified

* make format ; update Makefile

* handle raw tcp connections

* make dmsgweb work with multiple ports ; change everything to arrays or slices
* update skywire-utilities depenency
* change hardcoded dmsg discovery to use skywire-utilities/pkg/skyenv.DmsgDiscAddr
* feat: Add DialServerForIP method to dmsg client

This commit adds a new method `DialServerForIP` to the `Client` struct in the `pkg/dmsg/client.go` file. This method dials to dmsg servers to retrieve the public IP address of the client. It iterates through a list of server entries, attempts to dial each server, and returns the first public IP address it receives.

The purpose of this change is to provide a way for the client to obtain its public IP address from dmsg servers.

* feat: Add new commandline tool dmsgip

* chore: fix linting

* feat: Add support for dmsg server public keys in DialServerForIP method

This commit modifies the `DialServerForIP` method in the `pkg/dmsg/client.go` file to accept a slice of dmsg server public keys as an argument. If the `servers` argument is nil, the method retrieves the server entries using the `discoverServers` function and populates the `servers` slice with the static public keys from the entries. Then, it iterates through the `servers` slice and attempts to dial each server to retrieve the public IP address of the client.

The purpose of this change is to allow the `DialServerForIP` method to support custom dmsg server public keys, providing more flexibility in obtaining the client's public IP address from dmsg servers.

* feat: Add error handling for non-public IP address in DialServerForIP method

* refactor: Improve error handling and connection logic in DialServerForIP method

This commit refactors the `DialServerForIP` method in the `pkg/dmsg/client.go` file to improve error handling and connection logic. It introduces two separate loops to handle delegated servers and attempts to connect to each server individually. Additionally, it properly closes if the session is created just for the IP after dialing the server.

The purpose of this change is to enhance the reliability and stability of the `DialServerForIP` method when retrieving the public IP address from dmsg servers.

* refactor: Improve error handling and add MinSessions to startDmsg

* feat: Add dmsgip commandline tool to dmsg asa a subcommand

* refactor: Rename DialServerForIP to LookupIP in dmsg client

This commit renames the `DialServerForIP` method to `LookupIP` in the `pkg/dmsg/client.go` file. The functionality remains the same, but the new name better reflects the purpose of the method, which is to lookup the public IP address of the client from dmsg servers.

The purpose of this change is to improve the clarity and consistency of the method name, making it more intuitive for developers working with the dmsg client.

* chore: Move code around

* refactor: Improve error handling in LookupIP method

* test: add unit tests for LookupIP

* refactor: improve error handling in dmsgip cmd

* test: update IP lookup logic in stream_test.go

This commit updates the IP lookup logic in the `stream_test.go` file. It introduces conditional checks based on the operating system to handle different IP address formats. On Windows, the IP address is expected to be "127.0.0.1", while on other operating systems, it is expected to be "::1".

The purpose of this change is to ensure that the IP lookup tests pass correctly on different operating systems, improving the reliability and consistency of the test suite.
…t-ip-for-dmsg-server

improve limit-ip logic
…t-ip-for-dmsg-server-2

change default value of an argument
…l-issue

fix issue on flag use in release
…ry-dmsghttp-handler-logic

improve dmsghttp handler logic
…msghttp-handler

another improve on dmsghttp handler
* fix var name

* eliminate hardcoded defaults in skywire utilities

* update vendored deps

* make format

* fix CI error

* fix ci errors
* fix var name

* eliminate hardcoded defaults in skywire utilities

* update vendored deps

* make format

* fix CI error

* fix ci errors

* add goda dependency graph to README.md
* update dependency graph

* restructure command
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.

6 participants