mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-11-12 07:23:19 +09:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26bc84521c | ||
|
|
3a6bf7376c | ||
|
|
ba402f898a |
No files matched your search
@@ -205,10 +205,10 @@ extension PacketTunnelProvider {
|
||||
}
|
||||
}
|
||||
|
||||
func stopXray(completionHandler: () -> Void) {
|
||||
func stopXray(completionHandler: @escaping () -> Void) {
|
||||
Socks5Tunnel.quit()
|
||||
LibXrayStopXray()
|
||||
completionHandler()
|
||||
hevSocksTunnelGroup.notify(queue: .main, execute: completionHandler)
|
||||
}
|
||||
|
||||
func sockCallback(fd: uintptr_t) {
|
||||
@@ -345,10 +345,13 @@ extension PacketTunnelProvider {
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.global().async {
|
||||
hevSocksTunnelGroup.enter()
|
||||
DispatchQueue.global().async { [hevSocksTunnelGroup] in
|
||||
xrayLog(.info, message: "Hev socks started")
|
||||
completionHandler(nil)
|
||||
Socks5Tunnel.run(withConfig: configurationFilePath)
|
||||
let result = Socks5Tunnel.run(withConfig: configurationFilePath)
|
||||
xrayLog(.info, message: "Hev socks stopped: \(result)")
|
||||
hevSocksTunnelGroup.leave()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
var protoType: TunnelProtoType?
|
||||
|
||||
var activeIfaceIdx: UInt32 = 0
|
||||
let hevSocksTunnelGroup = DispatchGroup()
|
||||
|
||||
func openVPNPacketFlow() -> OpenVPNAdapterPacketFlow {
|
||||
openVPNPacketFlowAdapter
|
||||
@@ -316,10 +317,11 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
updateActiveInterfaceIndex(for: changePath)
|
||||
reasserting = true
|
||||
xrayLog(.info, message: "Applying network change to xray tunnel")
|
||||
stopXray { }
|
||||
startXray { [weak self] error in
|
||||
self?.reasserting = false
|
||||
completion(error)
|
||||
stopXray { [weak self] in
|
||||
self?.startXray { [weak self] error in
|
||||
self?.reasserting = false
|
||||
completion(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ Item {
|
||||
|
||||
enabled: d.scrolled > 0
|
||||
acceptedButtons: Qt.AllButtons
|
||||
hoverEnabled: true
|
||||
}
|
||||
|
||||
IconButtonType {
|
||||
|
||||
@@ -9,7 +9,7 @@ import os
|
||||
|
||||
class AwgApple(ConanFile):
|
||||
name = "awg-apple"
|
||||
version = "3.1.4"
|
||||
version = "3.1.5"
|
||||
settings = "os", "arch", "compiler"
|
||||
|
||||
@property
|
||||
@@ -45,7 +45,7 @@ class AwgApple(ConanFile):
|
||||
|
||||
def source(self):
|
||||
get(self, f"https://github.com/amnezia-vpn/amneziawg-apple/archive/refs/tags/v{self.version}.zip",
|
||||
sha256="09d7b760d18232fdf121ed2286b2f171b501dc31137e5e7d557c1ee3a99ef772", strip_root=True
|
||||
sha256="b3bd3680fa966dae67162c261e1b0a42235a0bd706ec6ea67cc04e707ef3b7a8", strip_root=True
|
||||
)
|
||||
|
||||
def generate(self):
|
||||
|
||||
Reference in new issue
Block a user