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

to work on ip address only - is it possible? #23

Open
webclinic017 opened this issue Aug 11, 2024 · 3 comments
Open

to work on ip address only - is it possible? #23

webclinic017 opened this issue Aug 11, 2024 · 3 comments

Comments

@webclinic017
Copy link

to work on ip address only - is it possible? without a domain name - server ip

@struanb
Copy link
Contributor

struanb commented Aug 11, 2024

Currently, no. This is because with an IP alone there's no way to identify which devtainer the user intended to route web requests.

Can you tell me more about your use-case? Perhaps I can help you find another way to achieve your goal.

@webclinic017
Copy link
Author

Development servers not production, to code & collaborate between developers, primarily the first instance is usually a raw IP only VPS for small scale teams, might be a autocreated virtual free domain from IP or something which works with installation process itself can be thought of..

Hey, thanks for ur reply, saw ur previous works, great..

@struanb
Copy link
Contributor

struanb commented Aug 13, 2024

Let's think this through and assume we could operate without a domain name.

  1. Without a domain name, obtaining an SSL certificate is impossible.

So to do this, I think we would need also to assume your developers already had a VPN connection to the instance over which to tunnel http traffic, otherwise your IDE and web dev traffic would be travelling over the public internet exposed.

That's plausible, and it would be a small modification to Dockside to allow the UI and IDE to be accessed over http. Currently that is disallowed, for security.

  1. Without a domain name, there'd be no way to address each individual devtainer. Support for multiple containerised dev environments (devtainers) is core to the Dockside proposition.

If you don't need this, but just the access control features of Dockside to support authentication and authorisation by multiple devs, perhaps Dockside could be patched to route all IDE and web dev traffic to one and only one devtainer. (Of course, if you didn't even need access control, you could run Theia or another web IDE directly on the instance).

If you do need this, you need another way to identify which web requests are destined for which devtainer. Currently the intended destination devtainer is determined by the least significant element of the wildcard domain name, as that is the most general and flexible. It may be possible to patch Dockside to use a path prefix instead, with the proviso that all web dev requests to each devtainer would include that path prefix too.


Now let's roll back a minute. Is all this really necessary? Why is the domain name such a difficulty? You could autogenerate a domain name for each Dockside instance from the instance's IP eg 1-2-3-4.mydomain.com for an instance at 1.2.3.4; and as long as the domain is valid and NS-delegated from mydomain.com then Dockside will be able to obtain a valid SSL wildcard certificate for that domain. (I admit that automating setup of the domain is non-trivial as you must ensure you add NS records to the mydomain.com zone that delegate the 1-2-3-4.mydomain.com subdomain to the instance, before Dockside starts. See the Google Cloud launch scripts for an example of how this can be done).

I hope this think-through is helpful. Happy to advise further if you provide more details of how you want your system to work.

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

No branches or pull requests

2 participants