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

Feature Request: Add UPnP Support to Enhance Convenience for Soft Router Users #330

Open
Ehco1996 opened this issue May 8, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@Ehco1996
Copy link
Owner

Ehco1996 commented May 8, 2024

Description:

The primary objective of this feature request is to integrate UPnP (Universal Plug and Play) functionality into ehco. This enhancement aims to significantly simplify the user experience for individuals utilizing soft routers.

Here's an example of a standard RelayRule configuration:

{
  "listen": "127.0.0.1:1234",
  "listen_type": "raw",
  "transport_type": "raw",
  "label": "relay1",
  "tcp_remotes": [
    "0.0.0.0:5201"
  ]
}

To facilitate this feature, it is proposed to add a new field: "enable_upnp": true/false.

When a rule is identified with UPnP enabled, ehco will leverage a UPnP client to map the specified listen_port (for instance, port 1234 in the example above) to the public internet. This process aims to automate port forwarding, thereby reducing manual configuration steps and improving accessibility for users with dynamic IP addresses or those behind NATs.

By implementing UPnP support, ehco can offer a more user-friendly and efficient setup process for its users, making it an even more powerful tool for traffic forwarding in diverse networking environments.

Related code

Additional Information

By the way, I recommend implementing a separate UPnP client within the pkg directory. This client can then be utilized to integrate the UPnP feature within the internal/relay module. This approach will help in maintaining a clean separation of concerns and enhance the modularity of the codebase, making it easier to manage and extend the UPnP functionality in the future.

@Ehco1996 Ehco1996 added the help wanted Extra attention is needed label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant