Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.46k stars 1.37k forks source link

Outline Manager fails to create droplet in NYC on DigitalOcean (invalid hostname) #1856

Open artemfdev opened 1 year ago

artemfdev commented 1 year ago

Greetings, I have an error when creating a server in NYC region on DigitalOcean using Outline Manager. I have successfully created a DigitalOcean servers in Frankfurt, Toronto regions, but when I try create it in NYC region, Outline Manager shows an error.

Steps to reproduce

1) In Outline Manager, click "Add Server" button 2) Choose "DigitalOcean" 3) Choose "New York" 4) Click "Setup Outline"

What I expect:

Radar-like animation with server creation

What I get:

Popup on the bottom left saying: "Error when creating Outline server"

Details

Errors in console:

POST https://api.digitalocean.com/v2/droplets 422
DigitalOcean request failed with status 422
Error from createDigitalOceanServer Error: XHR unprocessable_entity failed with 422: Only valid hostname characters are allowed. (a-z, A-Z, 0-9, . and -) 
at XMLHttpRequest.a.onload (digitalocean_api.ts:241:13)

Network requests for failed NYC droplet creation:

I can see failed /droplets API call

screenshot 163 screenshot 164

Outline successfully creates a new key named "Outline-" (I can see it in DigitalOcean console), but fails to create a droplet with the same name ("Outline-"), because of invalid droplet name.

Note: While technically "Outline-" includes only valid characters, hostname can not end with hyphen, therefore the error.

The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. A subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols, punctuation characters, or white space are permitted.

Example of successfull network request for droplet creation in Toronto region

screenshot_162

You can see the name is "Outline" so the droplet is created successfully.

Summary

Outline Manager tries to create a droplet with erroneous name "Outline-" for the NYC region which is not a valid droplet name for DigitalOcean. For other regions it uses "Outline" droplet name which works perfectly fine.

Outline Manager version 1.14.0

RomanMazyrin commented 2 months ago

Same for me, MacOS Outline Manager application, but only if i using other language than English as a language for application.