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

Read port-forwardings from settings file #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JayFoxRox
Copy link
Member

@JayFoxRox JayFoxRox commented Nov 20, 2019

This is a (hacky) partial implementation of #1.

  • The UI is read-only for now; settings have to be made in settings.json (manually).
  • It only implements port-forwarding, and not the socket networking that would be more useful for l2tunnel (although I'd expect a lot of code to overlap).
  • It doesn't bind widgets to settings like the rest of the code does.
  • It uses a structured settings section (this could be improved).
  • It does not support port-ranges (most routers would support this).
  • It does not support multi-protocol port-forwardings (some routers have a "Any", "Both" or "UDP/TCP" option).
  • Hackily calls iterator elements e; please suggest better names.
  • Is currently active, regardless of "Cable Connected" setting (might lead to security issue as user is not aware their network is exposed).
  • I disable the port list because it's read-only (enabling it allows editing with our current code and UI file). However, disabling it also disables the scrollbar, so you can't scoll (if too many ports). Can be worked around by changing window size.

New "Network" settings dialog

The configuration looks like this:

  "network": {
    "port_forwarding": [
      {
        "name": "Xbox traffic",
        "protocol": "udp",
        "guest_port": 3071,
        "host_port": 3071
      },
      {
        "name": "FTP",
        "protocol": "tcp",
        "guest_port": 21,
        "host_port": 8021
      }
    ]
  }

(Xbox traffic is actually on port 3074 - ignore my mistake in the example ports)

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

1 participant