mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-23 12:46:00 +00:00
merge origin/main
This commit is contained in:
@@ -11,6 +11,21 @@
|
||||
|
||||
## Dependency Updates
|
||||
*
|
||||
# Release 1.8.4
|
||||
|
||||
## What's New
|
||||
* none
|
||||
|
||||
## Other changes:
|
||||
* none
|
||||
|
||||
## Bugs fixed:
|
||||
* Fixed a bug from the CSDK handling hosted services
|
||||
* [#330](https://github.com/openziti/desktop-edge-win/issues/330) Fixed issue intercepting connections when the configured IP is not exactly in 100.64.0.0/10
|
||||
* [#328](https://github.com/openziti/desktop-edge-win/issues/328) Print a warning when the configured IP is not in the carrier grade NAT range 100.64.0.0/10
|
||||
|
||||
## Dependency Updates
|
||||
* Tunneler SDK to v0.11.10/CSDK 0.20.22
|
||||
|
||||
# Release 1.8.3
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM
|
||||
SET REPO_URL=https://github.com/openziti/ziti-tunnel-sdk-c.git
|
||||
SET ZITI_TUNNEL_REPO_BRANCH=v0.11.9
|
||||
SET ZITI_TUNNEL_REPO_BRANCH=v0.11.10
|
||||
REM override the c sdk used in the build - leave blank for the same as specified in the tunneler sdk
|
||||
SET ZITI_SDK_C_BRANCH=mfa
|
||||
REM the number of TCP connections the tunneler sdk can have at any one time
|
||||
|
||||
@@ -52,6 +52,7 @@ dns_manager* dns_mgr_c;
|
||||
int netifAddRoute(netif_handle dev, char* dest);
|
||||
int netifRemoveRoute(netif_handle dev, char* dest);
|
||||
|
||||
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
@@ -134,11 +135,6 @@ func makeDriver(name string) C.netif_driver {
|
||||
|
||||
//export netifWrite
|
||||
func netifWrite(_ C.netif_handle, buf unsafe.Pointer, length C.size_t) C.ssize_t {
|
||||
/*t, found := devMap[C.GoString(h.id)]
|
||||
if !found {
|
||||
log.Panicf("An unexpected and unrecoverable error has occurred while calling netifWrite")
|
||||
}*/
|
||||
|
||||
b := C.GoBytes(buf, C.int(length))
|
||||
|
||||
theTun.writeQ <- b
|
||||
|
||||
@@ -623,3 +623,7 @@ func getTunneledServiceAddresses(ts *C.tunneled_service_t) []dto.Address {
|
||||
}
|
||||
return values
|
||||
}
|
||||
|
||||
func InitTunnelerDns(ipBase uint32, mask int) {
|
||||
C.ziti_tunneler_init_dns(C.uint32_t(ipBase), C.int(mask))
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ package service
|
||||
import (
|
||||
"bufio"
|
||||
"crypto/sha1"
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/Microsoft/go-winio"
|
||||
@@ -260,6 +261,27 @@ func (p *Pipes) shutdownConnections() {
|
||||
}
|
||||
|
||||
func initialize(cLogLevel int) error {
|
||||
//TODO: this all needs to be cleaned up. it's done it two places and redundant
|
||||
//TODO: fix with mfa?
|
||||
ipv4 := rts.state.TunIpv4
|
||||
ipv4mask := rts.state.TunIpv4Mask
|
||||
if strings.TrimSpace(ipv4) == "" {
|
||||
log.Infof("ip not provided using default: %v", ipv4)
|
||||
ipv4 = constants.Ipv4ip
|
||||
rts.UpdateIpv4(ipv4)
|
||||
}
|
||||
if ipv4mask < constants.Ipv4MaxMask {
|
||||
log.Warnf("provided mask is too large: %d using default: %d", ipv4mask, constants.Ipv4DefaultMask)
|
||||
ipv4mask = constants.Ipv4DefaultMask
|
||||
rts.UpdateIpv4Mask(ipv4mask)
|
||||
}
|
||||
_, ipnet, err := net.ParseCIDR(fmt.Sprintf("%s/%d", ipv4, ipv4mask))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing CIDR block: (%v)", err)
|
||||
}
|
||||
dnsIpAsUint32 := binary.BigEndian.Uint32(ipnet.IP)
|
||||
cziti.InitTunnelerDns(dnsIpAsUint32, len(ipnet.Mask))
|
||||
|
||||
assignedIp, t, err := rts.CreateTun(rts.state.TunIpv4, rts.state.TunIpv4Mask)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -312,6 +334,16 @@ func setTunInfo(s *dto.TunnelStatus) {
|
||||
return
|
||||
}
|
||||
|
||||
carrierGradeNetworkRange := fmt.Sprintf("%s/%d", constants.Ipv4ip, 10)
|
||||
_, cgsubnet, _ := net.ParseCIDR(carrierGradeNetworkRange)
|
||||
|
||||
if !cgsubnet.Contains(ipnet.IP) {
|
||||
log.Warnf("============================================================================")
|
||||
log.Warnf("the ip provided [%s] is NOT in the expected CIDR range of %s", ipv4, carrierGradeNetworkRange)
|
||||
log.Warnf("this can cause unintented consequences. Please update the ip to one in the specified range.")
|
||||
log.Warnf("============================================================================")
|
||||
}
|
||||
|
||||
t := *rts.tun
|
||||
mtu, err := t.MTU()
|
||||
if err != nil {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
Version = "1.8.3"
|
||||
Revision = "1287aa42134e"
|
||||
Version = "1.8.4"
|
||||
Revision = "01ed41ee3cf6"
|
||||
Branch = "main"
|
||||
BuildUser = ""
|
||||
BuildDate = "2021-03-12 23:31:51"
|
||||
BuildDate = "2021-03-18 15:18:18"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user