mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-14 08:39:55 +00:00
Merge pull request #91 from openziti/issue-86-and-90
fixes issue #86 and issue #90
This commit is contained in:
@@ -141,6 +141,7 @@ namespace ZitiDesktopEdge {
|
||||
//LoadStatusFromService(s.Status);
|
||||
} catch /*ignored for now (Exception ex) */{
|
||||
SetCantDisplay();
|
||||
serviceClient.Reconnect();
|
||||
}
|
||||
Debug.WriteLine("App Loaded");
|
||||
IdentityMenu.OnForgot += IdentityForgotten;
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
# Release 0.0.19
|
||||
|
||||
* What's New
|
||||
|
||||
* Nothing yet
|
||||
|
||||
* Bug fixes
|
||||
|
||||
* [#82](https://github.com/openziti/desktop-edge-win/issues/82) - MTU was no longer sent to UI correctly
|
||||
* [#86](https://github.com/openziti/desktop-edge-win/issues/86) - Inconsistent treatment of DNS requests - all requests will be treated as absolute going forward
|
||||
* [#90](https://github.com/openziti/desktop-edge-win/issues/90) - UI will not reconnect to service if started before service
|
||||
|
||||
# Release 0.0.18
|
||||
|
||||
* What's New
|
||||
|
||||
+13
-2
@@ -22,6 +22,7 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
)
|
||||
@@ -65,12 +66,21 @@ type ctxService struct {
|
||||
count int
|
||||
}
|
||||
|
||||
func normalizeDnsName(dnsName string) string {
|
||||
if strings.HasSuffix(dnsName, ".") {
|
||||
return dnsName
|
||||
} else {
|
||||
// append a period to the dnsName - forcing it to be a FQDN
|
||||
return dnsName + "."
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterService will return the next ip address in the configured range. If the ip address is not
|
||||
// assigned to a hostname an error will also be returned indicating why.
|
||||
func (dns *dnsImpl) RegisterService(svcId string, dnsNameToReg string, port uint16, ctx *CZitiCtx, name string) (net.IP, error) {
|
||||
log.Infof("adding DNS entry for service name %s@%s:%d", name, dnsNameToReg, port)
|
||||
DnsInit(defaultCidr, defaultMaskBits)
|
||||
dnsName := dnsNameToReg + "."
|
||||
dnsName := normalizeDnsName(dnsNameToReg)
|
||||
key := fmt.Sprint(dnsName, ':', port)
|
||||
|
||||
var ip net.IP
|
||||
@@ -126,7 +136,8 @@ func (dns *dnsImpl) RegisterService(svcId string, dnsNameToReg string, port uint
|
||||
return ip, nil
|
||||
}
|
||||
|
||||
func (dns *dnsImpl) Resolve(dnsName string) net.IP {
|
||||
func (dns *dnsImpl) Resolve(toResolve string) net.IP {
|
||||
dnsName := normalizeDnsName(toResolve)
|
||||
return dns.hostnameMap[dnsName].ip
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user