Coder Social home page Coder Social logo

nekit's Introduction

NEKit

NEKit is deprecated.

It should still work but I'm not intent on maintaining it anymore. It has many flaws and needs a revamp to be a high-quality library.

The architecture of NEKit is not ideal due to my lack of experience when I was writing it. To make it worse, it's not in its most efficient form as there wasn't a good async io library while people abuse it for simple features that should be just implemented directly or use other lightweight libraries.

NEKit is not, was never intended, and probably will never become a library that simply works correctly out-of-the-box without understanding what it is doing under the hook. Through all these years, one thing I learned is for some function this low level, the developer should understand what oneself is doing. I'm always concerned that people are creating apps that slowing down users' phones unnecessarily because of this library and I feel responsible.

Thanks for everyone who has contributed, used or interested in this library.

License

Copyright (c) 2016, Zhuhao Wang All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of NEKit nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

nekit's People

Contributors

bjzhou avatar chenyihu avatar dependabot[bot] avatar dibel avatar gitter-badger avatar jzau avatar krausefx avatar mcfedr avatar sails avatar ssrlive avatar tualatrix avatar ufo22940268 avatar yvbbrjdr avatar zhuhaow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nekit's Issues

How to configure domain by prefix,suffix,keyword domain list rules without regular expression

In the changelog of NEKit 0.7.0 , it said that DomainRuleList can match domain based on prefix, suffix and keyword.

But each line in config file is initialized as a NSRegularExpression object in RuleParser.swift

do {
            let content = try String(contentsOfFile: filepath)
            let regexs = content.components(separatedBy: CharacterSet.newlines)
            var criteria: [DomainListRule.MatchCriterion] = []
            for regex in regexs {
                if !regex.isEmpty {
                    let re = try NSRegularExpression(pattern: regex, options: .caseInsensitive)
                    criteria.append(DomainListRule.MatchCriterion.regex(re))
                }
            }

            return DomainListRule(adapterFactory: adapter, criteria: criteria)
        } catch let error {
            throw ConfigurationParserError.ruleParsingError(errorInfo: "Encounter error when parse rule list file. \(error)")
        }

The definition of MatchCriterion is:

public enum MatchCriterion {
        case regex(NSRegularExpression), prefix(String), suffix(String), keyword(String), complete(String)

        func match(_ domain: String) -> Bool {
            switch self {
            case .regex(let regex):
                return regex.firstMatch(in: domain, options: [], range: NSRange(location: 0, length: domain.utf8.count)) != nil
            case .prefix(let prefix):
                return domain.hasPrefix(prefix)
            case .suffix(let suffix):
                return domain.hasSuffix(suffix)
            case .keyword(let keyword):
                return domain.contains(keyword)
            case .complete(let match):
                return domain == match
            }
        }
    }

So it looks like that rule will always match the regex case. Is this feature has been implemented completely ? Is there any other way to match suffix,prefix rules without regular expression?

iOS packet tunnel provider app extension connection lost

I was attempting to use the NEKit framework on an iOS packet tunnel provider app extension, when I ran into this issue. Without the framework, the extension successfully sets up a VPN. When the framework gets added the extension fails to start with the following error:

(pkd) <Info>: match returned 1 plug-ins
(Foundation)<Notice>: calling plugIn beginUsing:
(PlugInKit)<Info>: preparing plug-in <private>(<private>)
(PlugInKit)<Notice>: connection to plug-in <private>(847142BB-09E8-4A9A-A342-898C649B6A32) lost
(PlugInKit)<Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named 
(PlugInKit)<Info>: beginUsing of 847142BB-09E8-4A9A-A342-898C649B6A32 concludes with error=Error Domain=NSCocoaErrorDomain Code=4097 "connection 
(Foundation)<Notice>: PlugInKit error in beginUsing:
(NetworkExtension)<Error>: Failed to start extension org.xxx.yyy.extension: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named org.xxx.yyy.extension" UserInfo={NSDebugDescription=connection to service named org.xxx.yyy.extension}
(Foundation)<Notice>: killing invalid plugIn

To reproduce, it is only necessary to link the framework and import it on a working packet tunnel provider extension.

Seems like, most likely, the memory limit for network extensions could be affecting NEKit. No crash reports are available in the device logs.

can you send me a NEKit_demo.yaml demo file?

when I ran the demo target in the NEKit which called NEKitDemo, Xcode told me the config is nil, and I find there no NEKit_demo.yaml in the project. Can you add a demo file in the project? I just want to run the project without crash.

在ios上网络类型图标不更新的问题?

非常强大的工具,用来做ss代理很方便,我在ios上写一个简单的demo,配置的ss代理,启动vpn正常,也能连上。但是,在开启vpn时,系统状态栏的网络图标不会更新。比如,我开着Wi-Fi打开VPN,然后关掉Wi-Fi,正常情况下,网络图标应该显示“3G”(可以确认这时用的是3G网络),但还是显示Wi-Fi图标,关掉VPN后,图标立马恢复了正常。知道这是什么问题吗?

急需一个例子

swift不熟,看着好吃力。
demo里代码就几句话,太简单了。NEKit功能应该很强大才对,如果有一个实例相信会对使用者很有帮助。
顺便再提一个,HTTPProxyServer确实是很常用的,加入到库里是比较好的选择,之前我有写了一个,不过不太稳定,如果库里有相关的代码,又可以偷师了😊

请问 server.start() 之后为什么还是打不开网站呢?

我使用 xcode 8.1 导入了 NEKit,完全按照示例代码运行了 server.start()。
确认了 https 服务器和我的账户都没有问题,应用退出到后台后使用 safari 依然无法打开 facebook,手机状态栏中也没有出现 VPN 的标识。
请问这是为什么呢?在代码运行完成之后是否还需要做其他的工作?

代码如下:

DDLog.removeAllLoggers()
DDLog.add(DDTTYLogger.sharedInstance(), with: .info)
        
ObserverFactory.currentFactory = DebugObserverFactory()
let auth = HTTPAuthentication(username: "tztest", password: "123")
let secureHttpAdapterFactory = SecureHTTPAdapterFactory(serverHost: "us.xxx.com", serverPort: 443, auth: auth)
        
let allRule = AllRule(adapterFactory: secureHttpAdapterFactory)
let manager = RuleManager(fromRules: [allRule], appendDirect: true)
        
RuleManager.currentManager = manager
httpsProxy = GCDHTTPProxyServer(address: IPv4Address(fromString:"127.0.0.1"), port: 9090)

try! httpsProxy!.start()

产生的日志如下:

Proxy server <GCDHTTPProxyServer address:Optional(<IPv4Address 127.0.0.1>) port:<Port 9090>> started.

谢谢。

carthage update

warning: 'AsyncSocket' is deprecated: The RunLoop versions of CocoaAsyncSocket are deprecated and will be removed in a future release. Please migrate to GCDAsyncSocket.

I am got a crash blow, can someone give some help?

Incident Identifier: 45C778E1-0024-495B-8152-982337AE25C3
CrashReporter Key: 5279a0b859a1a1cd1fc293fb513330d5350d16e8
Hardware Model: iPhone5,2
Process: coreSvr [5174]
Path: /private/var/containers/Bundle/Application/65AE22F3-3C17-4AE0-B525-3C1C25FA7F44/vpn.app/PlugIns/coreSvr.appex/coreSvr

Version: 1 (1.0)
Code Type: ARM (Native)
Role: Unspecified
Parent Process: launchd [1]

Date/Time: 2016-12-30 11:06:05.5176 +0800
Launch Time: 2016-12-30 11:05:21.0000 +0800
OS Version: iPhone OS 10.1 (14B72)
Report Version: 104

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 2

Filtered syslog:
None found

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x1dc2e83c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x1dc2e62e mach_msg + 42
2 CoreFoundation 0x1e456868 __CFRunLoopServiceMachPort + 136
3 CoreFoundation 0x1e454b66 __CFRunLoopRun + 1014
4 CoreFoundation 0x1e3a4072 CFRunLoopRunSpecific + 486
5 CoreFoundation 0x1e3a3e80 CFRunLoopRunInMode + 104
6 Foundation 0x1ecd60da -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 260
7 Foundation 0x1ed2699e -[NSRunLoop(NSRunLoop) run] + 80
8 libxpc.dylib 0x1dd33376 _xpc_objc_main + 598
9 libxpc.dylib 0x1dd34966 xpc_main + 164
10 Foundation 0x1eebce7e service_connection_handler + 0
11 PlugInKit 0x25a33c08 -[PKService run] + 772
12 PlugInKit 0x25a337d0 +[PKService main] + 56
13 PlugInKit 0x25a33c28 +[PKService _defaultRun:arguments:] + 20
14 Foundation 0x1eea4122 NSExtensionMain + 48
15 libdyld.dylib 0x1db6e50a start + 2

Thread 1:
0 libsystem_pthread.dylib 0x1dcf6484 start_wqthread + 0

Thread 2 name: Dispatch queue: Network.framework
Thread 2 Crashed:
0 libswiftFoundation.dylib 0x01338ae8 0x12a4000 + 609000
1 NEKit 0x0054bc18 thunk (NWTCPSocket.swift:0)
2 Network 0x294a0cee __69-[NWTCPConnection readMinimumLength:maximumLength:completionHandler:]_block_invoke + 100
3 libdispatch.dylib 0x1db41096 _dispatch_call_block_and_release + 10
4 libdispatch.dylib 0x1db4dec4 _dispatch_queue_serial_drain + 840
5 libdispatch.dylib 0x1db44378 _dispatch_queue_invoke + 566
6 libdispatch.dylib 0x1db4fa90 _dispatch_root_queue_drain + 378
7 libdispatch.dylib 0x1db4f8b6 _dispatch_worker_thread3 + 106
8 libsystem_pthread.dylib 0x1dcf6936 _pthread_wqthread + 1168
9 libsystem_pthread.dylib 0x1dcf648c start_wqthread + 8

Thread 3:
0 libsystem_pthread.dylib 0x1dcf6484 start_wqthread + 0

Thread 4:
0 libsystem_pthread.dylib 0x1dcf6484 start_wqthread + 0

Thread 5:
0 libsystem_kernel.dylib 0x1dc44744 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1dcf69a0 _pthread_wqthread + 1274
2 libsystem_pthread.dylib 0x1dcf648c start_wqthread + 8

Thread 6:
0 libsystem_kernel.dylib 0x1dc44744 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1dcf69a0 _pthread_wqthread + 1274
2 libsystem_pthread.dylib 0x1dcf648c start_wqthread + 8

Thread 2 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000008 r2: 0x00000000 r3: 0x0054bbe4
r4: 0x00000000 r5: 0x00000000 r6: 0x1469b0b0 r7: 0x19131e34
r8: 0x00550e3c r9: 0x145ac610 r10: 0x00000000 r11: 0x00000000
ip: 0x005d5864 sp: 0x19131e2c lr: 0x012d25cc pc: 0x01338ae8
cpsr: 0x60000010

Crash in tcp_recv_func when buf is NULL

Crash context:

I was debugging Speche using the lastest commit of NEKit.
The crash happened when a 40 bytes tcp packet was received. TCP_EVENT_CLOSED was sending a NULL buf parameter to tcp_recv_func.

screen shot 2017-03-05 at 23 29 58

screen shot 2017-03-05 at 23 31 01

pac file limitation

Hello @zhuhaow,

i am running into some issues when i am using a pac file within NEKit on iOS 10.2.1. I dont know if it is related to NEKit or an Apple limitation but maybe you can help.

proxySettings.autoProxyConfigurationEnabled = true
proxySettings.proxyAutoConfigurationJavaScript = local.pacJSCode()
//proxySettings.proxyAutoConfigurationJavaScript = nil
//proxySettings.proxyAutoConfigurationURL = URL(string: "https://some/address/to/pac.js")

The error appears on both versions of code (local or remote pac). If i send a lot of requests either from an App or from Safari i have some kind of loading hang. It starts to load then the loading freezes and it takes the system something like 10-20s to load further.

For clarification: the pac file forwards to the proxy running on port 9090 so thats nit the issue. Requests are also forwarded to remote server when i am sing one.

Thanks for any help you can provide.

Best,

keKs

Is it productive?

Hi! Guy. Is this library productive?
And there is a error when build this demo.

error: no such file or directory: NEKit/src/IPStack/DirectUDPStack.swift

Please tell me, how to use reject.conf?

My Google refuses to look for examples of reject.conf.
People, please show some examples, i wanna move few domains (what should be rejected) from pac.js into reject.conf. I only found small post about this file about yaml syntax.

Carthage BUILD FAILED

Xcode: Version 8.2.1 (8C1002)
macOS: 10.12.2 (16C67)
Carthage: 0.18.1
Swift: 3.0

use carthage update --no-use-binaries --platform ios

The following is an error

/Users/Broccoli/Desktop/Demo/Carrot/Carthage/Checkouts/NEKit/src/RawSocket/NWUDPSocket.swift:58:25: error: value of optional type '[Data]?' not unwrapped; did you mean to use '!' or '?'?
A shell task (/usr/bin/xcrun xcodebuild -project /Users/Broccoli/Desktop/Demo/Carrot/Carthage/Checkouts/NEKit/NEKit.xcodeproj -scheme NEKit-iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)

Mail app not working when connected through ss.

When ss is turned on, NEKit can establish a tcp connection but fail to read anything from the socket. It always return NWTCPSocket got an error when reading data: Socket not connected.

To reproduce, just use the system mail app to send an email. (Can be reproduced in both iOS & macOS)

Other ss client apps work just fine with the system mail app.

What is the issue with TUNInterface?

Hi, there. In the readme, it says Do not enable TUNInterface as of now since it is not working..
Could you detail the current issue with TUNInterface? Thanks!

does this support Objc project?

I tried to import this project to my Objc project via carthage, but the xCode cannot found Factory classes which is so strange.

I checked the NEKit-Swift.h file and found ProxyServer, Socket, but no Factory, Raw Socket, and Rule.

Could you please tell me why, and how to solve this problem? thank you.

fell in with : unexpectedly found nil while unwrapping an Optional value

**

_Sep 7 10:26:30 Guangjiande-iPhone nesessionmanager[122] : NESMVPNSession[- bj:064F7EE5-05B5-459D-B0E7-F6AC718CF799]: status changed to connected
Sep 7 10:26:30 Guangjiande-iPhone assertiond[63] : assertion failed: 13G36: assertiond + 72572 [0B862A7D-6E8B-3778-AD17-C7694ECD5BCD]: 0x3
Sep 7 10:26:30 Guangjiande-iPhone Unknown[63] :
Sep 7 10:26:30 Guangjiande-iPhone PacketTunnel[1047] : fatal error: unexpectedly found nil while unwrapping an Optional value
Sep 7 10:26:30 Guangjiande-iPhone nesessionmanager[122] : NESMVPNSession[- bj:064F7EE5-05B5-459D-B0E7-F6AC718CF799]: status changed to disconnecting

Sep 7 10:26:45 NESMVPNSession: status changed to connected
Sep 7 10:26:45 Guangjiande-iPhone assertiond[63] : assertion failed: 13G36: assertiond + 72572 [0B862A7D-6E8B-3778-AD17-C7694ECD5BCD]: 0x3
Sep 7 10:26:45 Guangjiande-iPhone PacketTunnel[1048] : Accepted a new socket from IP stack.
Sep 7 10:26:45 Guangjiande-iPhone PacketTunnel[1048] : fatal error: unexpectedly found nil while unwrapping an Optional value_

**

log format optimization

before

2016/10/31 09:05:27:688  Adapter socket <DirectAdapter host:m.kuaidi100.com port:80)> connected to remote with response <ConnectResponse>.

after

2016/10/31 09:05:27:663 <INFO> [DirectAdapter-1] Connection established: 123.59.41.31:80

使用的 Adapter 和线程id放在前面,包含日志的level,日志语句更言简意赅,用户看的时候会更方便一些。

CFBundleShortVersionString using git_release_version is illegal

the "Set :CFBundleShortVersionString ${git_release_version#*v}\" in project configurations made CFBundleShortVersionString a very long string, which gets app's binary rejected when uploaded to iTunes Connect.

Full error message:

ERROR ITMS-90060: "This bundle is invalid. The value for key CFBundleShortVersionString '3ba2400cf93c9c816dc0b9b1da496ab8e020b42b' in the Info.plist file must be a period-separated list of at most three non-negative integers."

Suggestion:
leave the CFBundleShortVersionString as it is.

randomly got an critical error

<Critical>: NWTCPSocket got an error when reading data: Optional(Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected")

只对HTTP做代理吗?

IOS上开启VPN,配置的SS,默认全部走代理,但是只有HTTP协议走了SS代理,TCP协议没有走SS代理。

opt. Doc

hey zhuhaow,

great stuff you created there.

Would it be possible to get an explonation for the opt. functions?

public static var MAXNWTCPSocketReadDataSize = 128 * 1024

// This is only used in finding the end of HTTP header (as of now). There is no limit on the length of http header, but Apache set it to 8KB
public static var MAXNWTCPScanLength = 8912

public static var DNSFakeIPTTL = 300

public static var DNSPendingSessionLifeTime = 10

public static var UDPSocketActiveTimeout = 300

public static var UDPSocketActiveCheckInterval = 60

public static var MAXHTTPContentBlockLength = 10240

public static var RejectAdapterDefaultDelay = 300

public static var DNSTimeout = 1

public static var forwardReadInterval = 50

Thanks in advance!

setReadHandler handler called repeatedly when switching from wifi to mobile data and back to wifi.

When I switch network type from wifi to mobile and then back to mobile, there will be a lot of logs like following. and cpu usage is around 180%. between switching, I made a few http requests.

Oct 14 22:16:40 simpzan-iPhone PacketTunnel-iOS[2889] <Critical>: Error when reading from remote server. Optional(Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument")

I add a little code to force crash the process when the issue happens to get the crash log.
simpzan@9da0a31
Do you encounter this issue? It is nearly 100% reproducible here.

Incident Identifier: EA61F6DE-3624-4FF9-A375-DF808865C25A
CrashReporter Key:   f2b536e05332f120584e58d94612d7d77c0bfa7d
Hardware Model:      iPhone8,4
Process:             PacketTunnel-iOS [2889]
Path:                /private/var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/PlugIns/PacketTunnel-iOS.appex/PacketTunnel-iOS
Identifier:          com.simpzan.Shadow-iOS.PacketTunnel-iOS
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2016-10-14 22:16:40.40 +0800
Launch Time:         2016-10-14 22:15:56.56 +0800
OS Version:          iOS 9.3.3 (13G34)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001006b6f1c
Triggered by Thread:  1

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x00000001808c8fd8 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001808c8e54 mach_msg + 72
2   CoreFoundation                  0x0000000180d00c60 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000180cfe964 __CFRunLoopRun + 1032
4   CoreFoundation                  0x0000000180c28c50 CFRunLoopRunSpecific + 384
5   Foundation                      0x0000000181638cfc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
6   Foundation                      0x000000018168e030 -[NSRunLoop(NSRunLoop) run] + 88
7   libxpc.dylib                    0x00000001809ecc64 _xpc_objc_main + 660
8   libxpc.dylib                    0x00000001809ee9dc xpc_main + 200
9   Foundation                      0x000000018180bd60 service_connection_handler + 0
10  PlugInKit                       0x000000018804ec48 -[PKService run] + 544
11  PlugInKit                       0x000000018804e8dc +[PKService main] + 56
12  PlugInKit                       0x000000018804ec6c +[PKService _defaultRun:arguments:] + 20
13  libextension.dylib              0x000000018161e058 NSExtensionMain + 64
14  libdyld.dylib                   0x00000001807c68b8 start + 4

Thread 1 name:  Dispatch queue: Network.framework
Thread 1 Crashed:
0   libswiftCore.dylib              0x00000001006b6f1c 0x100578000 + 1306396
1   libswiftCore.dylib              0x00000001006b6f1c 0x100578000 + 1306396
2   NEKit                           0x00000001003f61e0 NWUDPSocket.(init(host : String, port : Int) -> NWUDPSocket?).(closure #1) (NWUDPSocket.swift:59)
3   NEKit                           0x00000001003f63d4 thunk (NWUDPSocket.swift:0)
4   Network                         0x000000018b7a13a4 __44-[NWUDPSession setReadHandler:maxDatagrams:]_block_invoke + 196
5   libnetwork.dylib                0x000000018b770498 __nw_udp_session_handle_read_block_invoke + 100
6   libdispatch.dylib               0x00000001807954bc _dispatch_call_block_and_release + 24
7   libdispatch.dylib               0x000000018079547c _dispatch_client_callout + 16
8   libdispatch.dylib               0x00000001807a14c0 _dispatch_queue_drain + 864
9   libdispatch.dylib               0x0000000180798f80 _dispatch_queue_invoke + 464
10  libdispatch.dylib               0x00000001807a3390 _dispatch_root_queue_drain + 728
11  libdispatch.dylib               0x00000001807a30b0 _dispatch_worker_thread3 + 112
12  libsystem_pthread.dylib         0x00000001809ad470 _pthread_wqthread + 1092
13  libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x00000001808e54d8 kevent_qos + 8
1   libdispatch.dylib               0x00000001807a87d8 _dispatch_mgr_invoke + 232
2   libdispatch.dylib               0x0000000180797648 _dispatch_source_invoke + 0

Thread 3:
0   libsystem_kernel.dylib          0x00000001808e4b48 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x00000001809ad530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 4:
0   libsystem_kernel.dylib          0x00000001808e4b48 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x00000001809ad530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 5:
0   libsystem_kernel.dylib          0x00000001808e4b48 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x00000001809ad530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 6 name:  com.apple.NSURLConnectionLoader
Thread 6:
0   libsystem_kernel.dylib          0x00000001808c8fd8 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001808c8e54 mach_msg + 72
2   CoreFoundation                  0x0000000180d00c60 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000180cfe964 __CFRunLoopRun + 1032
4   CoreFoundation                  0x0000000180c28c50 CFRunLoopRunSpecific + 384
5   CFNetwork                       0x00000001813a9bcc +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6   Foundation                      0x000000018171fe4c __NSThread__start__ + 1000
7   libsystem_pthread.dylib         0x00000001809afb28 _pthread_body + 156
8   libsystem_pthread.dylib         0x00000001809afa8c _pthread_body + 0
9   libsystem_pthread.dylib         0x00000001809ad028 thread_start + 4

Thread 7 name:  com.apple.CFSocket.private
Thread 7:
0   libsystem_kernel.dylib          0x00000001808e4344 __select + 8
1   CoreFoundation                  0x0000000180d071c8 __CFSocketManager + 648
2   libsystem_pthread.dylib         0x00000001809afb28 _pthread_body + 156
3   libsystem_pthread.dylib         0x00000001809afa8c _pthread_body + 0
4   libsystem_pthread.dylib         0x00000001809ad028 thread_start + 4

Thread 8:
0   libsystem_kernel.dylib          0x00000001808e4b48 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x00000001809ad530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 9:
0   libsystem_kernel.dylib          0x00000001808e4b48 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x00000001809ad530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x00000001809ad020 start_wqthread + 4

Thread 1 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x00000001809a68f4   x2: 0x0000000136d51da0   x3: 0x0000000000000008
    x4: 0x0000000000000000   x5: 0x0000000000000020   x6: 0x0000000000000000   x7: 0x0000000000000fa0
    x8: 0x0000000100e9d408   x9: 0x0000000000004000  x10: 0x0000000136d54000  x11: 0x0000000000003fff
   x12: 0x0000000136d50000  x13: 0x0000000000003fff  x14: 0xffffffffffffc000  x15: 0x0000000000003fff
   x16: 0x0000000180910168  x17: 0x0000000100778040  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x0000000000000044  x21: 0x0000000000000039  x22: 0x000000010042d4d0  x23: 0x0000000000000002
   x24: 0x0000000136d527d0  x25: 0x00000001007a9720  x26: 0x000000010042d540  x27: 0x0000000000000010
   x28: 0x0000000000010001  fp: 0x000000016e0869a0   lr: 0x00000001006b6f1c
    sp: 0x000000016e086940   pc: 0x00000001006b6f1c cpsr: 0x80000000

Binary Images:
0x100068000 - 0x10007bfff PacketTunnel-iOS arm64  <2338c5d05ca6300c827629edfe17db89> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/PlugIns/PacketTunnel-iOS.appex/PacketTunnel-iOS
0x1000b4000 - 0x1000b7fff MobileSubstrate.dylib arm64  <3134cfb2f722310ea2c742ae4dc131ab> /Library/MobileSubstrate/MobileSubstrate.dylib
0x1000c4000 - 0x100103fff CocoaAsyncSocket arm64  <5fedd920609f34cc969514754df22e13> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket
0x10024c000 - 0x10026bfff CocoaLumberjack arm64  <896f2818601c366383229600ff0325a1> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/CocoaLumberjack.framework/CocoaLumberjack
0x100318000 - 0x100323fff MMWormhole arm64  <bc7af9f238ee3b248080c71a194abe07> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/MMWormhole.framework/MMWormhole
0x100360000 - 0x100367fff RHRevealLoader.dylib arm64  <786cede9735f3a29b5d7939366053d57> /Library/MobileSubstrate/DynamicLibraries/RHRevealLoader.dylib
0x10037c000 - 0x100433fff NEKit arm64  <098e76fb96ae336e8263477d3ad598e4> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/NEKit.framework/NEKit
0x100578000 - 0x100777fff libswiftCore.dylib arm64  <160a815885033b4db08d3aa94ac06413> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftCore.dylib
0x1009b8000 - 0x1009c3fff libswiftCoreGraphics.dylib arm64  <c685370568a7357a892b4d3a6988cf1a> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftCoreGraphics.dylib
0x1009d8000 - 0x1009dffff libswiftCoreImage.dylib arm64  <2844310aca6b3065b95998a211349d0e> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftCoreImage.dylib
0x1009f0000 - 0x1009f7fff libswiftDarwin.dylib arm64  <5bba14fccdf032e28baa867a05052262> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftDarwin.dylib
0x100a14000 - 0x100a1bfff libswiftDispatch.dylib arm64  <824a17f74200332b829d35895e9082ec> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftDispatch.dylib
0x100a30000 - 0x100a6bfff libswiftFoundation.dylib arm64  <82511703757935b5896edf3a94c1e4f6> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftFoundation.dylib
0x100abc000 - 0x100ac3fff libswiftObjectiveC.dylib arm64  <56af7ca1e2e635ee8273bef66ff0c119> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftObjectiveC.dylib
0x100ae0000 - 0x100aebfff libswiftUIKit.dylib arm64  <6355134b558732ce8e34790dc6145970> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftUIKit.dylib
0x100af8000 - 0x100afffff SSFLEXLoader.dylib arm64  <38d39740e71634ce9f65d04954a3ea97> /Library/MobileSubstrate/DynamicLibraries/SSFLEXLoader.dylib
0x100b10000 - 0x100b17fff libswiftWatchConnectivity.dylib arm64  <a10cdcbe8a4530dfa4b8410ed01ccfae> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftWatchConnectivity.dylib
0x100b24000 - 0x100b2bfff CocoaLumberjackSwift arm64  <32914796c8113e99b879c8a16c0c003f> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/CocoaLumberjackSwift.framework/CocoaLumberjackSwift
0x100b60000 - 0x100b67fff CommonCrypto arm64  <fdd76ba82c243d22a1801e82d63fb677> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/CommonCrypto.framework/CommonCrypto
0x100b74000 - 0x100b83fff lwip arm64  <d7a8ff4398823cf497354bb3cd08579d> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/lwip.framework/lwip
0x100bdc000 - 0x100bebfff MMDB arm64  <489778cd3e4a3544a93a63e5786d1b74> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/MMDB.framework/MMDB
0x100c38000 - 0x100c5ffff Sodium arm64  <31cffc6b43f03a05b514bc4021ab3b91> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/Sodium.framework/Sodium
0x100cd0000 - 0x100cdbfff tun2socks arm64  <0b8fca639757376eae50fa0b9ffc4865> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/tun2socks.framework/tun2socks
0x100d1c000 - 0x100d4ffff Yaml arm64  <97bb5768fd163df8a615f2839b70426c> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/Yaml.framework/Yaml
0x100e84000 - 0x100e8bfff libswiftContacts.dylib arm64  <a6629800411534029d5fe5e53b462ec4> /var/containers/Bundle/Application/5B488804-E273-4785-BE24-E40C8EEAA4B4/Shadow-iOS.app/Frameworks/libswiftContacts.dylib
0x1010d8000 - 0x1010dbfff SubstrateLoader.dylib arm64  <54645dc0321231d88a022fd67a793278> /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib
0x101104000 - 0x10111bfff CydiaSubstrate arm64  <ffa3562ce21d3fa1a2df98d17214503e> /Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate
0x101124000 - 0x10120ffff libcycript.dylib arm64  <03d674843c723c10b1146dcb7267074c> /usr/lib/libcycript.dylib
0x1200a0000 - 0x1200cffff dyld arm64  <a1862e29910f3f069a363730df77dad7> /usr/lib/dyld
0x180330000 - 0x180331fff libSystem.B.dylib arm64  <5bb501a091dc3a22a5544d34a4312de1> /usr/lib/libSystem.B.dylib
0x180334000 - 0x180386fff libc++.1.dylib arm64  <9ec0d9dcf728349582c26a7da72f0364> /usr/lib/libc++.1.dylib
0x180388000 - 0x1803a7fff libc++abi.dylib arm64  <aaa40b7f52513cf79c6f814b133556a7> /usr/lib/libc++abi.dylib
0x1803a8000 - 0x180714fff libobjc.A.dylib arm64  <939f392022903f2da2858e676e4191ef> /usr/lib/libobjc.A.dylib
0x180718000 - 0x18071cfff libcache.dylib arm64  <43424f4c7252330ca92c1a865da896e1> /usr/lib/system/libcache.dylib
0x180720000 - 0x18072bfff libcommonCrypto.dylib arm64  <e47d758d207e32c8ab546b59785d2ab8> /usr/lib/system/libcommonCrypto.dylib
0x18072c000 - 0x18072ffff libcompiler_rt.dylib arm64  <b77c451c7ffb356fb3c8368cac95d8f3> /usr/lib/system/libcompiler_rt.dylib
0x180730000 - 0x180737fff libcopyfile.dylib arm64  <1c1678aa36073b42b4406c6dbb06e9f0> /usr/lib/system/libcopyfile.dylib
0x180738000 - 0x180793fff libcorecrypto.dylib arm64  <b42ff635d1303d45bafe057e5a1e6243> /usr/lib/system/libcorecrypto.dylib
0x180794000 - 0x1807c2fff libdispatch.dylib arm64  <65568801b7463adeb6e20dc25d14d801> /usr/lib/system/libdispatch.dylib
0x1807c4000 - 0x1807c6fff libdyld.dylib arm64  <69ea263c8ab93db49b98a24fbd6eb392> /usr/lib/system/libdyld.dylib
0x1807c8000 - 0x1807c8fff liblaunch.dylib arm64  <fbb5f1442c3039188da689963efde4d8> /usr/lib/system/liblaunch.dylib
0x1807cc000 - 0x1807d0fff libmacho.dylib arm64  <1f37b179ad26307192b3b763ba5f816a> /usr/lib/system/libmacho.dylib
0x1807d4000 - 0x1807d5fff libremovefile.dylib arm64  <267c6cbaf2193309bd8a191fad38cc79> /usr/lib/system/libremovefile.dylib
0x1807d8000 - 0x1807eefff libsystem_asl.dylib arm64  <fffe50d37b1c3f92af6f4a68a6d60068> /usr/lib/system/libsystem_asl.dylib
0x1807f0000 - 0x1807f1fff libsystem_blocks.dylib arm64  <8bbf799e57f93ed1be24cf2ce6c221a3> /usr/lib/system/libsystem_blocks.dylib
0x1807f4000 - 0x180873fff libsystem_c.dylib arm64  <c3408ef0608b3d68acc24d59d6af9528> /usr/lib/system/libsystem_c.dylib
0x180874000 - 0x180877fff libsystem_configuration.dylib arm64  <c5ce1ced5659354ab63871b42d04a7cd> /usr/lib/system/libsystem_configuration.dylib
0x180878000 - 0x18087bfff libsystem_containermanager.dylib arm64  <504648cfa43d3668b9678b74e33697f2> /usr/lib/system/libsystem_containermanager.dylib
0x18087c000 - 0x18087dfff libsystem_coreservices.dylib arm64  <8f94549c633036aa99efb0f067031a05> /usr/lib/system/libsystem_coreservices.dylib
0x180880000 - 0x180896fff libsystem_coretls.dylib arm64  <498e424eb31f3d5cb49523cec07f339d> /usr/lib/system/libsystem_coretls.dylib
0x180898000 - 0x1808a0fff libsystem_dnssd.dylib arm64  <573c3639fde83e87885bfe02c057538d> /usr/lib/system/libsystem_dnssd.dylib
0x1808a4000 - 0x1808c6fff libsystem_info.dylib arm64  <932df5ba705a3b6d948c5dcff196ea6b> /usr/lib/system/libsystem_info.dylib
0x1808c8000 - 0x1808e9fff libsystem_kernel.dylib arm64  <18bda76f38f93376900d6dab355c191f> /usr/lib/system/libsystem_kernel.dylib
0x1808ec000 - 0x180908fff libsystem_m.dylib arm64  <a97bf91d4a233dbc94bef06734a2eac0> /usr/lib/system/libsystem_m.dylib
0x18090c000 - 0x180925fff libsystem_malloc.dylib arm64  <a8af95191b283ca9aa7f9cf80c459bf5> /usr/lib/system/libsystem_malloc.dylib
0x180928000 - 0x18098bfff libsystem_network.dylib arm64  <a8e4200aecc73e56a8458a0e9cb4a6f0> /usr/lib/system/libsystem_network.dylib
0x18098c000 - 0x180995fff libsystem_networkextension.dylib arm64  <d1a7579c71943631845c2908d69bfbc6> /usr/lib/system/libsystem_networkextension.dylib
0x180998000 - 0x1809a2fff libsystem_notify.dylib arm64  <da8d7d155da230d287a67c46e9b3ccbc> /usr/lib/system/libsystem_notify.dylib
0x1809a4000 - 0x1809a9fff libsystem_platform.dylib arm64  <4386956061113d7a9e415e543b1243bc> /usr/lib/system/libsystem_platform.dylib
0x1809ac000 - 0x1809b4fff libsystem_pthread.dylib arm64  <73c5c182a73d38a3b0a3a1f496289278> /usr/lib/system/libsystem_pthread.dylib
0x1809b8000 - 0x1809bafff libsystem_sandbox.dylib arm64  <1188d6b10703327cb5d72a5623200c30> /usr/lib/system/libsystem_sandbox.dylib
0x1809bc000 - 0x1809ccfff libsystem_trace.dylib arm64  <f89ac4edeffb3694a894efa7742b0f1f> /usr/lib/system/libsystem_trace.dylib
0x1809d0000 - 0x1809d5fff libunwind.dylib arm64  <b0067e5ea3ca3b28abc5cb7d50390363> /usr/lib/system/libunwind.dylib
0x1809d8000 - 0x1809d8fff libvminterpose.dylib arm64  <630bf4c89edf3935b7afe56abdb5caad> /usr/lib/system/libvminterpose.dylib
0x1809dc000 - 0x180a01fff libxpc.dylib arm64  <fc63a0a505523f7fac2c4ea9d9662ba1> /usr/lib/system/libxpc.dylib
0x180a04000 - 0x180c09fff libicucore.A.dylib arm64  <d1856fdadee0393ebd636fa4020a454b> /usr/lib/libicucore.A.dylib
0x180c0c000 - 0x180c1dfff libz.1.dylib arm64  <8fcb56adfdc13e9593582266b1e4ac18> /usr/lib/libz.1.dylib
0x180c20000 - 0x180fa0fff CoreFoundation arm64  <182fd72b7fdf330b8dbf70db93af6b63> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x180fa4000 - 0x180fb4fff libbsm.0.dylib arm64  <d045301bcacc37d785d754d5c978d979> /usr/lib/libbsm.0.dylib
0x180fb8000 - 0x180fb8fff libenergytrace.dylib arm64  <c4ee08bffdfc3ce0990c1fbeb858f9dc> /usr/lib/libenergytrace.dylib
0x180fbc000 - 0x18102dfff IOKit arm64  <0864d9c20424332d8979a4f548848c16> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x181030000 - 0x181050fff libMobileGestalt.dylib arm64  <9cc485a12c323768a6b6e88d973bd44e> /usr/lib/libMobileGestalt.dylib
0x181054000 - 0x18113efff libxml2.2.dylib arm64  <d6c7d4fa4ab033ea94a89058ae09b14b> /usr/lib/libxml2.2.dylib
0x181140000 - 0x1811b2fff Security arm64  <4c7468d385513e4db673ec80c318ee20> /System/Library/Frameworks/Security.framework/Security
0x1811b4000 - 0x18120dfff SystemConfiguration arm64  <92717250c7393c44878d137773604d46> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x181210000 - 0x1812f8fff libsqlite3.dylib arm64  <c703a175f1c43ed28d81b839ba961183> /usr/lib/libsqlite3.dylib
0x1812fc000 - 0x181590fff CFNetwork arm64  <e65cd15333e435b5975900dc9111f58b> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x181594000 - 0x1815a1fff libbz2.1.0.dylib arm64  <8ebfd413e3fd3889b546857fcf554b6f> /usr/lib/libbz2.1.0.dylib
0x1815a4000 - 0x1815bdfff liblzma.5.dylib arm64  <68bb861dc8bd3547b5ace073ed504b14> /usr/lib/liblzma.5.dylib
0x1815c0000 - 0x1815dafff libCRFSuite.dylib arm64  <1a2c1f709f213faf81fd2223b719c899> /usr/lib/libCRFSuite.dylib
0x1815dc000 - 0x181606fff libarchive.2.dylib arm64  <bf6ae1a9c965363ba9f10ff0ca32ee7c> /usr/lib/libarchive.2.dylib
0x181608000 - 0x181626fff libextension.dylib arm64  <8a88fb35fee03a36ae138e676b9a0e9f> /usr/lib/libextension.dylib
0x181628000 - 0x181629fff liblangid.dylib arm64  <cdb184e30c3c303694a96b3150520673> /usr/lib/liblangid.dylib
0x18162c000 - 0x18189afff Foundation arm64  <7cf4edf781cb30438b812ded8716cd95> /System/Library/Frameworks/Foundation.framework/Foundation
0x18189c000 - 0x181947fff libBLAS.dylib arm64  <097b7e769a3439ad8fdb3abb0edc9daf> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x181948000 - 0x181cadfff libLAPACK.dylib arm64  <566419f65c9338599694a04da8e20fbf> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x181cb0000 - 0x181f15fff vImage arm64  <789df1b35e183397803583a25feff3c7> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x181f18000 - 0x181f3afff libvMisc.dylib arm64  <3c655ae6f62035bbba069387c490efbb> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x181f3c000 - 0x181f4ffff libLinearAlgebra.dylib arm64  <94d099e954d638e39ef1773639ef61af> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLinearAlgebra.dylib
0x181f50000 - 0x181f5ffff libSparseBLAS.dylib arm64  <80ca4fb770613c76b2449daf05c6dc25> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libSparseBLAS.dylib
0x181f60000 - 0x181fccfff libvDSP.dylib arm64  <f4e8d68f55af3511a28a616737dcc354> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x181fd0000 - 0x181fd0fff vecLib arm64  <546ad53c3a4a36709fdf6e50b76b2ec9> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x181fd4000 - 0x181fd4fff Accelerate arm64  <a1953e95570a3de6a923a812ffbd90ad> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x181fd8000 - 0x182503fff CoreGraphics arm64  <f58e942f6bd039dc8de98619e53500bf> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x182504000 - 0x182518fff GraphicsServices arm64  <d8509ae0233539218bf97db29a7d31c2> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x18251c000 - 0x182564fff AppSupport arm64  <1469530c1aa03d2486d678bed8482764> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x182568000 - 0x18263bfff MobileCoreServices arm64  <2096d560a53b3fd28ff0a7f46e3ba060> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x18263c000 - 0x18268bfff BaseBoard arm64  <b6f2014b564430538f5252776acfa530> /System/Library/PrivateFrameworks/BaseBoard.framework/BaseBoard
0x18268c000 - 0x182697fff AssertionServices arm64  <48c978bd14553765b4a7f1cee1b14c83> /System/Library/PrivateFrameworks/AssertionServices.framework/AssertionServices
0x182698000 - 0x1826bcfff BackBoardServices arm64  <207836d8c1833eeab468f622f4d0f366> /System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices
0x1826c0000 - 0x1826c3fff MobileSystemServices arm64  <6d85ae92680935bbb51db96c7a021118> /System/Library/PrivateFrameworks/MobileSystemServices.framework/MobileSystemServices
0x1826c4000 - 0x1826f9fff FrontBoardServices arm64  <b1a46eb324d23a51813b565ae7f04b88> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
0x1826fc000 - 0x182706fff UserNotificationServices arm64  <74d3e76dff833048b39ae8e0ceb44140> /System/Library/PrivateFrameworks/UserNotificationServices.framework/UserNotificationServices
0x182708000 - 0x182734fff SpringBoardServices arm64  <6535787e172939d0b8abfe852a185b3d> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x182738000 - 0x182749fff MobileKeyBag arm64  <169edc8949693d349807056d1e316f2a> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x18274c000 - 0x182752fff IOSurface arm64  <d62fd4ed209e32f98d5dbc34f9484ef4> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x182754000 - 0x182760fff liblockdown.dylib arm64  <36e1e9187c193410a5f7cf46e3dc7afe> /usr/lib/liblockdown.dylib
0x182764000 - 0x182776fff CrashReporterSupport arm64  <3b4a2b63b2a9334fa8019a4152d3aa49> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x182778000 - 0x18277afff IOSurfaceAccelerator arm64  <65789d64b5f937e987c6f27125a38100> /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/IOSurfaceAccelerator
0x18277c000 - 0x1827bdfff AppleJPEG arm64  <8b25b915b426335f8d9112a8c7e29e46> /System/Library/PrivateFrameworks/AppleJPEG.framework/AppleJPEG
0x1827c0000 - 0x182ae3fff ImageIO arm64  <985b712758c43d62a2104d9e708fb2e9> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x182ae4000 - 0x182ae8fff TCC arm64  <09fcccda721f35c3936e68acf3d216a4> /System/Library/PrivateFrameworks/TCC.framework/TCC
0x182aec000 - 0x182af1fff AggregateDictionary arm64  <51bcd4b61f3739eb85fdcc4a037e3696> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x182af4000 - 0x182b01fff PowerLog arm64  <a50ba8508d733823be55425db249606c> /System/Library/PrivateFrameworks/PowerLog.framework/PowerLog
0x182b04000 - 0x182b66fff libTelephonyUtilDynamic.dylib arm64  <59e0bc898f27370d8e4961910f891b3b> /usr/lib/libTelephonyUtilDynamic.dylib
0x182b68000 - 0x182b7afff CommonUtilities arm64  <194ea4f46bf537029d10e4ce8b28ca5f> /System/Library/PrivateFrameworks/CommonUtilities.framework/CommonUtilities
0x182b7c000 - 0x182b93fff libcompression.dylib arm64  <ac77f3a3cad832a7b748c30e013bbc0b> /usr/lib/libcompression.dylib
0x182b94000 - 0x182ddefff CoreData arm64  <aa00d2e704e333e199f8e34b3c661b12> /System/Library/Frameworks/CoreData.framework/CoreData
0x182de0000 - 0x182de4fff libCoreVMClient.dylib arm64  <69b5ba7317d532b898c3ffb5574bb883> /System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
0x182de8000 - 0x182decfff IOAccelerator arm64  <8763c48f6ea73eae887a414462ffe098> /System/Library/PrivateFrameworks/IOAccelerator.framework/IOAccelerator
0x182df0000 - 0x182df1fff libCVMSPluginSupport.dylib arm64  <ed32d5e2c1e630b18097aa7890c92171> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x182df4000 - 0x182df7fff libCoreFSCache.dylib arm64  <abe2067778503127a31c42352d2e43ec> /System/Library/Frameworks/OpenGLES.framework/libCoreFSCache.dylib
0x182df8000 - 0x182e3efff libGLImage.dylib arm64  <e67acd0811bf318dadb48a49b97bee7b> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x182e40000 - 0x182e4afff libGFXShared.dylib arm64  <fdc295986ea03203bbfc904ffc4cca6b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x182e4c000 - 0x182e53fff IOMobileFramebuffer arm64  <f82bfbe1dc083eabb7ff1a8d9980fe47> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x182e54000 - 0x182e54fff libmetal_timestamp.dylib arm64  <bdc8f33a1b453c8f827726c7f46640dc> /System/Library/PrivateFrameworks/GPUCompiler.framework/libmetal_timestamp.dylib
0x182e58000 - 0x182e9efff Metal arm64  <95ce1f8a4d483d11aa49533e2ae2a568> /System/Library/Frameworks/Metal.framework/Metal
0x182ea0000 - 0x182eaafff OpenGLES arm64  <7c7a0c5191f53f518e994638139ca1df> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x182eac000 - 0x182ecefff CoreVideo arm64  <31ef8b764af3301ea5e7267fcae838cb> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x182ed0000 - 0x182ed2fff OAuth arm64  <0f1ae5abcad13b4b948193a2405c61b4> /System/Library/PrivateFrameworks/OAuth.framework/OAuth
0x182edc000 - 0x182f13fff Accounts arm64  <1cf893c2c3c03137acb576d5a7fc2cee> /System/Library/Frameworks/Accounts.framework/Accounts
0x182f14000 - 0x183006fff libiconv.2.dylib arm64  <1c378c57054a32a6b2eed4e3cbb3a2b7> /usr/lib/libiconv.2.dylib
0x183008000 - 0x1830c1fff CoreAudio arm64  <25687ef4b3c4389f828006882b280db4> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x1830c4000 - 0x1830c7fff UserFS arm64  <693602c29c64370aab1a77544ddc7e5a> /System/Library/PrivateFrameworks/UserFS.framework/UserFS
0x1830c8000 - 0x1831b6fff CoreMedia arm64  <e4b8c027690c3a268d47209f071ea0b7> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x1831b8000 - 0x1831c0fff libcupolicy.dylib arm64  <056df1f0f2893ad08b9c7fbed9271c6f> /usr/lib/libcupolicy.dylib
0x1831c4000 - 0x183236fff CoreTelephony arm64  <d48572ad7be13a99b7a783c12c6657f4> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x183238000 - 0x183318fff libFontParser.dylib arm64  <7ab9c32919d731969bc2a75b3f03aa17> /System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib
0x18331c000 - 0x18339efff VideoToolbox arm64  <96c874d7271f3ec18a39b6de15ef6384> /System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
0x1833a0000 - 0x1833a0fff FontServices arm64  <39a3005cf101328f94f3a412cfa04fae> /System/Library/PrivateFrameworks/FontServices.framework/FontServices
0x1833a4000 - 0x1834c7fff CoreText arm64  <688f036ee040335aaf44f555b7b98ace> /System/Library/Frameworks/CoreText.framework/CoreText
0x1834c8000 - 0x1834d9fff ProtocolBuffer arm64  <4d1a9d53f37b3b448cbc62ede839532f> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x1834dc000 - 0x183503fff PersistentConnection arm64  <57092c3dc97437f9a14b61cae9e60e88> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x183504000 - 0x183509fff DataMigration arm64  <ba39fefdd4d530108117d3cce9c24d80> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x18350c000 - 0x183825fff AudioToolbox arm64  <3acc644e69ff3aedae6e3af12f13c58c> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x183828000 - 0x1839d6fff QuartzCore arm64  <cbbd0fe690bc3efbb32085b9cdbc292f> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x1839d8000 - 0x1839defff Netrb arm64  <e3abc95050e93feb9999aad619858dd8> /System/Library/PrivateFrameworks/Netrb.framework/Netrb
0x1839e0000 - 0x1839f1fff libcmph.dylib arm64  <f9b0e4b1c2b83f848b351670183dcf24> /usr/lib/libcmph.dylib
0x1839f4000 - 0x183a11fff libmis.dylib arm64  <19a3fb5270713311900b8723341c9649> /usr/lib/libmis.dylib
0x183a14000 - 0x183a94fff LanguageModeling arm64  <25b1d85465f531118bbcd9b3afcb4151> /System/Library/PrivateFrameworks/LanguageModeling.framework/LanguageModeling
0x183a98000 - 0x183b75fff ManagedConfiguration arm64  <6829ea88182532c69d9eb79c0d5d8ab8> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x183b78000 - 0x183b8ffff libmarisa.dylib arm64  <72aff9de7b7a3d0f8d24b2f2e33599b1> /usr/lib/libmarisa.dylib
0x183b90000 - 0x183c57fff ProofReader arm64  <e62d51dcf4a134a2981acc214a79ee83> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x183c58000 - 0x183c5efff MediaAccessibility arm64  <dbc84b51887d3c239f748993bfe87be2> /System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility
0x183c60000 - 0x183c6ffff MobileAsset arm64  <4f36adf36909306e8cdda53f431aec5e> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset
0x183c70000 - 0x183cd1fff ColorSync arm64  <7a7f1de762e734a1b0185bbcf4c5805d> /System/Library/PrivateFrameworks/ColorSync.framework/ColorSync
0x183cd4000 - 0x183d1ffff MetalPerformanceShaders arm64  <7530c46bdba43048b3780b308d1e0349> /System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders
0x183d20000 - 0x18414cfff FaceCore arm64  <9fe0da65d44f3e58872fa11c1d79a801> /System/Library/PrivateFrameworks/FaceCore.framework/FaceCore
0x184150000 - 0x1841cbfff Quagga arm64  <872de61a4b163a57b1e5df76124b9013> /System/Library/PrivateFrameworks/Quagga.framework/Quagga
0x1841cc000 - 0x184376fff CoreImage arm64  <df4ffff30c383def8d08b5b28b6df84d> /System/Library/Frameworks/CoreImage.framework/CoreImage
0x184378000 - 0x1843aafff TextInput arm64  <475a479564123e0aafd3f578a8ad861a> /System/Library/PrivateFrameworks/TextInput.framework/TextInput
0x1843ac000 - 0x1843b9fff libAccessibility.dylib arm64  <767e55a612343e498e13731d796f2f9f> /usr/lib/libAccessibility.dylib
0x1843c8000 - 0x1849a9fff JavaScriptCore arm64  <7b9d576bd0b0397aa02c5215ff3b128b> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x184ba0000 - 0x185b78fff WebCore arm64  <c34b05e2e0153569b040074396aa9cd4> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x185b7c000 - 0x185ba5fff libxslt.1.dylib arm64  <6553a930d8933aa0b054d0ebd966c83a> /usr/lib/libxslt.1.dylib
0x185ba8000 - 0x185c83fff WebKitLegacy arm64  <6bf2496789113045a9c472f536802b90> /System/Library/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy
0x185c84000 - 0x185d3cfff CoreUI arm64  <1fd04759197f312ab80538caca1dd94e> /System/Library/PrivateFrameworks/CoreUI.framework/CoreUI
0x185d40000 - 0x185d65fff DictionaryServices arm64  <03b326076ce4388099fb7442bcbcbd3b> /System/Library/PrivateFrameworks/DictionaryServices.framework/DictionaryServices
0x185d68000 - 0x185d68fff HangTracer arm64  <2989b93ed68939929f8898e8d586bdc2> /System/Library/PrivateFrameworks/HangTracer.framework/HangTracer
0x185d6c000 - 0x185dbafff PhysicsKit arm64  <d5863be3b3d3375997ce983229cfa34a> /System/Library/PrivateFrameworks/PhysicsKit.framework/PhysicsKit
0x185dbc000 - 0x185e92fff UIFoundation arm64  <a012ee13e0bf395794c95ce1b5670728> /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
0x185e94000 - 0x186abefff UIKit arm64  <bc9398e03d593b3fb4b66794602f9602> /System/Library/Frameworks/UIKit.framework/UIKit
0x186ae4000 - 0x186b09fff DataAccessExpress arm64  <e410b3818af13c29bf77e432571282d1> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
0x186b28000 - 0x186ba3fff AddressBook arm64  <a607c38de2223ca7ad304af82f136914> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x187278000 - 0x187284fff IntlPreferences arm64  <26be9c8bb13f380cb1c3b6b817802f17> /System/Library/PrivateFrameworks/IntlPreferences.framework/IntlPreferences
0x187b04000 - 0x187b09fff ConstantClasses arm64  <e397ebe2ca23360688f15acf8b0a3e6c> /System/Library/PrivateFrameworks/ConstantClasses.framework/ConstantClasses
0x187b0c000 - 0x187b17fff libChineseTokenizer.dylib arm64  <12cb857d186b341f9ad1c8ee75095ee5> /usr/lib/libChineseTokenizer.dylib
0x187b18000 - 0x187d77fff libmecabra.dylib arm64  <fd1d427c7edb3273a4b69ab882307567> /usr/lib/libmecabra.dylib
0x187f0c000 - 0x18803dfff MobileSpotlightIndex arm64  <db752ecb81bc378789058b3e985f9c8f> /System/Library/PrivateFrameworks/MobileSpotlightIndex.framework/MobileSpotlightIndex
0x188040000 - 0x18805bfff PlugInKit arm64  <84c62dcf044f3ddbbb66629ff757016d> /System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit
0x1880bc000 - 0x1880e4fff ContactsFoundation arm64  <5b56325e99d43df0875893f3629cf775> /System/Library/PrivateFrameworks/ContactsFoundation.framework/ContactsFoundation
0x1880e8000 - 0x1880ecfff ParsecSubscriptionServiceSupport arm64  <c840948751e43512a04638cf49270da6> /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
0x1880f0000 - 0x188178fff Contacts arm64  <ac886a1dee353472b42d6236c7472564> /System/Library/Frameworks/Contacts.framework/Contacts
0x18817c000 - 0x1881b7fff CoreSpotlight arm64  <4fc7c966e5a03e14bc6d2bd4bb757934> /System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight
0x1881b8000 - 0x1881d7fff vCard arm64  <8139df6f04d830f39ef345d53ffb6466> /System/Library/PrivateFrameworks/vCard.framework/vCard
0x1884d0000 - 0x1884dafff CaptiveNetwork arm64  <9c19a9fb40b930098b60496851683f6d> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork
0x1884dc000 - 0x188502fff EAP8021X arm64  <f3f3fc3867983647b6898adb483c29db> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x188718000 - 0x188729fff UserManagement arm64  <1d49514ccc853a8f8ad3fdec01ad4766> /System/Library/PrivateFrameworks/UserManagement.framework/UserManagement
0x18b76c000 - 0x18b773fff libnetwork.dylib arm64  <83e299ccae0f3db4b025d3c1e9348905> /usr/lib/libnetwork.dylib
0x18b788000 - 0x18b7acfff Network arm64  <3f3db62e8dfd3208b3931df22cb678cc> /System/Library/PrivateFrameworks/Network.framework/Network
0x18eb20000 - 0x18ec49fff NetworkExtension arm64  <72ea23ba49e239d995c3923d88c6cf20> /System/Library/Frameworks/NetworkExtension.framework/NetworkExtension
0x18fbbc000 - 0x18fc15fff CoreBrightness arm64  <d3db17f73b17334193450eb8569238f6> /System/Library/PrivateFrameworks/CoreBrightness.framework/CoreBrightness
0x190a84000 - 0x190ad5fff libstdc++.6.dylib arm64  <b79500b0dd97321c851ed4a470121dc0> /usr/lib/libstdc++.6.dylib
0x193dac000 - 0x193de9fff WatchConnectivity arm64  <473da9211a8039c8a5431250836844a5> /System/Library/Frameworks/WatchConnectivity.framework/WatchConnectivity
0x198aac000 - 0x198ab0fff sdk.dylib arm64  <2a09f52d94d53f12a831e7c9148f901d> /System/Library/Caches/com.apple.xpc/sdk.dylib

SpeedAdapter

I was attempting to implement without using YAML config, as noted in the README. Is it possible to implement a SpeedAdapter/Rule?

Crash when write >64K data to TUNTCPSocket

* thread #5: tid = 0x153733, 0x00000001006a1c84 tun2socks`TSTCPSocket.writeData(data=Foundation.Data @ 0x000000016e11a6f8, self=0x000000010105cef0) -> () + 316 at TSTCPSocket.swift:198, queue = 'NEKit.ProcessingQueue', stop reason = EXC_BREAKPOINT (code=1, subcode=0x1006a1c84)
  * frame #0: 0x00000001006a1c84 tun2socks`TSTCPSocket.writeData(data=Foundation.Data @ 0x000000016e11a6f8, self=0x000000010105cef0) -> () + 316 at TSTCPSocket.swift:198
    frame #1: 0x000000010040b218 NEKit`TUNTCPSocket.write(data=Foundation.Data @ 0x000000016e11a738, self=0x000000010105b680) -> () + 68 at TUNTCPSocket.swift:101
    frame #2: 0x000000010040cc9c NEKit`protocol witness for RawTCPSocketProtocol.write(data : Data) -> () in conformance TUNTCPSocket + 76 at TUNTCPSocket.swift:0
    frame #3: 0x000000010041e920 NEKit`ProxySocket.write(data=Foundation.Data @ 0x000000016e11a7d8, self=0x000000010105cb20) -> () + 264 at ProxySocket.swift:87
    frame #4: 0x00000001003fef6c NEKit`Tunnel.didRead(data=Foundation.Data @ 0x000000016e11a968, socket=0x000000010106ec10, self=0x000000010105fc40) -> () + 1124 at Tunnel.swift:223
    frame #5: 0x0000000100400508 NEKit`protocol witness for SocketDelegate.didRead(data : Data, from : SocketProtocol) -> () in conformance Tunnel + 112 at Tunnel.swift:0
    frame #6: 0x000000010040a494 NEKit`DirectAdapter.didRead(data=Foundation.Data @ 0x000000016e11aa88, rawSocket=0x000000010105a0a0, self=0x000000010106ec10) -> () + 360 at DirectAdapter.swift:41
    frame #7: 0x0000000100455b8c NEKit`protocol witness for RawTCPSocketDelegate.didRead(data : Data, from : RawTCPSocketProtocol) -> () in conformance AdapterSocket + 112 at AdapterSocket.swift:0
    frame #8: 0x00000001003e7f48 NEKit`NWTCPSocket.(self=0x000000010105a0a0, data=some) -> ()).(closure #1) + 1192 at NWTCPSocket.swift:272
    frame #9: 0x00000001003dd924 NEKit`thunk + 44 at DNSServer.swift:0
    frame #10: 0x000000018c6c9200 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #11: 0x000000018c6c91c0 libdispatch.dylib`_dispatch_client_callout + 16
    frame #12: 0x000000018c6d7444 libdispatch.dylib`_dispatch_queue_serial_drain + 928
    frame #13: 0x000000018c6cc9a8 libdispatch.dylib`_dispatch_queue_invoke + 652
    frame #14: 0x000000018c6d7940 libdispatch.dylib`_dispatch_queue_override_invoke + 360
    frame #15: 0x000000018c6d938c libdispatch.dylib`_dispatch_root_queue_drain + 572
    frame #16: 0x000000018c6d90ec libdispatch.dylib`_dispatch_worker_thread3 + 124
    frame #17: 0x000000018c8d22b8 libsystem_pthread.dylib`_pthread_wqthread + 1288
    frame #18: 0x000000018c8d1da4 libsystem_pthread.dylib`start_wqthread + 4

UInt16 overflow (65535) at TSTCPSocket.swift L198

let err = tcp_write(pcb, (data as NSData).bytes, UInt16(data.count), UInt8(TCP_WRITE_FLAG_COPY))

a temp workaround

NEKit.Opt.MAXNWTCPSocketReadDataSize = 60 * 1024

Got a crash when integrating to my app with Carthage

I've built everything with Carthage following instructions and everything looked green. but when I add all frameworks to my project (through "Linked Frameworks and Libraries" under "General") when I run the app it just crashed. When removing that it runs as it should be.

My project is ObjectiveC one and I'm using latest Xcode (8.3). Is there anything I'm missing?

https代理不能在ios下使用

很奇怪的问题,同样的配置文件在mac下是没有 问题的,使用http在ios下也是没有问题的,开始怀疑是证书的问题.
可是把根证书导入了也是不行.
尝试过wingy使用同样的https配置是可以的,所以不知道原因了.

Swift3: Extension died unexpectedly

env

  • swift: 3.0.1
  • xcode: 8.1
  • ios with network extension

First, let me make sure my app and config is correct

In startTunne methodl:

        let ipv4Settings = NEIPv4Settings(addresses: ["10.0.0.1"], subnetMasks: ["255.255.255.0"])
        let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "8.8.8.8")
        networkSettings.mtu = 1500
        networkSettings.iPv4Settings = ipv4Settings
        setTunnelNetworkSettings(networkSettings) {
            error in
            guard error == nil else {
                NSLog(error.debugDescription)
                completionHandler(error)
                return
            }
            completionHandler(nil)
        }

then start vpn, whatever the app is in the foreground or the background, the VPN is running correct. Network traffic is normal too.

Now, let me use NEKit

In startTunne method:

        let directAdapterFactory = DirectAdapterFactory()
        let allRule = AllRule(adapterFactory: directAdapterFactory)
        RuleManager.currentManager = RuleManager(fromRules: [allRule], appendDirect: true)
        RawSocketFactory.TunnelProvider = self
        self.proxyServer = GCDHTTPProxyServer(address: IPv4Address(fromString: "127.0.0.1"), port: Port(port: UInt16(self.proxyPort)))
        try! self.proxyServer.start()
        
        let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "8.8.8.8")
        networkSettings.mtu = 1500
        
        let ipv4Settings = NEIPv4Settings(addresses: ["192.169.89.1"], subnetMasks: ["255.255.255.0"])
        ipv4Settings.includedRoutes = [NetworkExtension.NEIPv4Route.default()]
        networkSettings.iPv4Settings = ipv4Settings
        
        let proxySettings = NEProxySettings()
        proxySettings.httpEnabled = true
        proxySettings.httpServer = NEProxyServer(address: "127.0.0.1", port: proxyPort)
        proxySettings.httpsEnabled = true
        proxySettings.httpsServer = NEProxyServer(address: "127.0.0.1", port: proxyPort)
        proxySettings.excludeSimpleHostnames = true
        networkSettings.proxySettings = proxySettings
        
        let DNSSettings = NEDNSSettings(servers: ["198.18.0.1"])
        DNSSettings.matchDomains = [""]
        DNSSettings.matchDomainsNoSearch = false
        networkSettings.dnsSettings = DNSSettings
        
        setTunnelNetworkSettings(networkSettings) {
            error in
            guard error == nil else {
                DDLogError("Encountered an error setting up the network: \(error)")
                completionHandler(error)
                return
            }
            self.interface = TUNInterface(packetFlow: self.packetFlow)
            let fakeIPPool = IPv4Pool(start: IPv4Address(fromString: "198.18.1.1")!, end: IPv4Address(fromString: "198.18.255.255")!)
            let dnsServer = DNSServer(address: IPv4Address(fromString: "198.18.0.1")!, port: Port(port: 53), fakeIPPool: fakeIPPool)
            let resolver = UDPDNSResolver(address: IPv4Address(fromString: "114.114.114.114")!, port: Port(port: 53))
            dnsServer.registerResolver(resolver)
            self.interface.registerStack(dnsServer)
            DNSServer.currentServer = dnsServer
            let udpStack = UDPDirectStack()
            self.interface.registerStack(udpStack)
            let tcpStack = TCPStack.stack
            tcpStack.proxyServer = self.proxyServer
            self.interface.registerStack(tcpStack)
            self.interface.start()
            completionHandler(nil)
        }

then start vpn, the vpn can be started, but i found when network traffic was generated, the Network Extension died unexpectedly.

This article also mentioned this problem.

Thanks for your NEKit.

Can not compile source code because of no class 'IPv4Address'

I tried to compile the source code, only to get the error:
NEKit/IPStack/Router.swift:5:32: Use of undeclared type 'IPv4Address'
....
NEKit/IPStack/Router.swift:58:9: Use of unresolved identifier 'NetworkInterface'

I found no class named 'IPv4Adress' and 'NetworkInterface'
and I see 'IPv4Address is removed. Now both IPv4 and IPv6 are represented by one class IPAddress.' in Changelog.md, so haven't change that in some swift class?
Thx!

NEKit should control the thread number on iOS

It is very likely that the iOS has some strict limitations on the number of threads an extension can have, but the GCD does not properly handle that and just creates too many threads.

NEKit should have a configuration that sets the whole framework to a compact-thread mode, where only a constant number of dispatch queues are used.

High battery usage

Referring to hellowingy/wingy-announcement#3
Not sure if it is related, feel free to close it if it is not about NEKit, but on my mac it is also listed as "Using Significant Energy".
Let me know if I could help in anyway.

Thank you for this project, I couldn't find a link for donating, please let me know if there is one.

Swift 3 support

Many Swift projects have been migrated to Swift 3, so they cannot be mixed with NEKit. When will NEKit migrate as well?

oc调用

使用 Carthage生成framework后 调用,发现没有 ShadowsocksAdapter
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.