mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-25 12:39:50 +02:00
UDP support (#5390)
This commit is contained in:
parent
e3b66294a0
commit
71bcb4f28e
5 changed files with 123 additions and 3 deletions
|
@ -114,10 +114,12 @@ func GetDomainsForURL(u *url.URL, includeDefaultPort bool) []string {
|
|||
}
|
||||
|
||||
// tcp+https://ssh.example.com:22
|
||||
// udp+https://ssh.example.com:22
|
||||
// => ssh.example.com:22
|
||||
// tcp+https://proxy.example.com/ssh.example.com:22
|
||||
// udp+https://proxy.example.com/ssh.example.com:22
|
||||
// => ssh.example.com:22
|
||||
if strings.HasPrefix(u.Scheme, "tcp+") {
|
||||
if strings.HasPrefix(u.Scheme, "tcp+") || strings.HasPrefix(u.Scheme, "udp+") {
|
||||
hosts := strings.Split(u.Path, "/")[1:]
|
||||
// if there are no domains in the path part of the URL, use the host
|
||||
if len(hosts) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue