update tm bundle fetch, fix desktop joiners
This commit is contained in:
1 parent
6afdbd901a
commit
c62aa89d4c
8 files changed
+50
-5
No files matched your search
@@ -192,6 +192,10 @@ func (t *Tunnel) AddBypassIP(ip net.IP) error {
|
||||
}
|
||||
addr := v4.String()
|
||||
t.mu.Lock()
|
||||
if t.stopped {
|
||||
t.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
if _, dup := t.bypass[addr]; dup {
|
||||
t.mu.Unlock()
|
||||
return nil
|
||||
@@ -205,6 +209,13 @@ func (t *Tunnel) AddBypassIP(ip net.IP) error {
|
||||
return fmt.Errorf("desktoptun: add bypass %s via %s: %w", addr, gw, err)
|
||||
}
|
||||
t.mu.Lock()
|
||||
if t.stopped {
|
||||
t.mu.Unlock()
|
||||
if err := deleteHostRoute(addr); err != nil {
|
||||
t.log("[desktoptun] remove orphaned bypass %s: %v", addr, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
t.bypass[addr] = struct{}{}
|
||||
t.mu.Unlock()
|
||||
t.log("[desktoptun] bypass %s -> %s", addr, gw)
|
||||
|
||||
Reference in new issue
Block a user