Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Yuko Zheng
@yukozh
想问一下 NEKit能否代理常规的TCP,而非HTTP/HTTPS
    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
因为看到NEProxySettings似乎只有对http、https的配置
我这边试下来HTTP/HTTPS请求确实能走通 但是常规的TCP不行
@zhuhaow
mengke0612
@mengke0612
支持sock5
qianlima210210
@qianlima210210
可以先跑下ss的流
zhiYong964941772
@zhiYong964941772
想问一下,ipv4Settings.excludedRoutes配置了Twitter,ipv4Settings.includedRoutes配置了爱奇艺的一些域名,基于tcp连接之后,访问Twitter没问题,访问爱奇艺的视频却被地区限制,我的服务器在大陆
mengke0612
@mengke0612
放心吧 这个立方没人解答问题的 都是来问问题的 😆
zhiYong964941772
@zhiYong964941772
没事,已经做出来了
moomoo
@woodymoo
how can I use NEKit in cocoapods? I add pod 'zhuhaow/NEKit' in my podfile, but cannot find the NEKit, why? and how to resolve?
moomoo
@woodymoo
@zhuhaow
zhuhaow
@zhuhaow
Use Carthage, you can use Carthage alongside cocoapods
moomoo
@woodymoo
我现在用carthage,出来各种不同的错误,总是build失败, 没法搞, 试了一天了也没法弄。 只能用 cocoapods了。。。
怎样把NEkit 项目加到我项目中呢
zhuhaow
@zhuhaow
carthage似乎在最新的Xcode上有问题,可以看一下他们的issue
moomoo
@woodymoo
试了很多办法,都没法解决。。。
用了他们crathage的script ,也没用。 我是xcode小白, 怎么把nekit 自己编译加入到我的项目里面?
zhuhaow
@zhuhaow
似乎没有特别简单的办法……
有空的话我会看看有没有可能修
moomoo
@woodymoo
你可以建个简单 podspec 放到git上,这样我们就可以直接用了
zhuhaow
@zhuhaow
如果“简单”的话你可以提PR
OK,我读完了那个issue,几个问题:如果你试了他们的workaround不能解决,100%是你的问题,你需要的是把arm64 simulator这个arch去掉,如果不work,是因为你做的不对
想要修复这个问题不仅需要Carthage的支持,还需要很多其他依赖的支持
nekit的一些依赖并不是简单的swift或是oc的
如果lipo不能用,那么一些依赖需要重新考虑如何编译
这些工作我不知道是不是会有人去做
考虑到nekit已经deprecated了,我也没有任何动力去做
所以现在的方案就是,用他们的workaround
在你用上arm的MacBook之前都不会有任何问题
FZR
@fuzhaorui
@lixinfeng1017 不知道你whatsapp链接问题解决了啊
烟雨平生
@2856571872
SS,目前在规则内的,是根据规则走直连和代理。但是没匹配上规则的,在tunnel里设置了RuleManager(fromRules: userRules,appendDirect: false),为什么还走直连,不走代理

@zhiYong964941772

想问一下,ipv4Settings.excludedRoutes配置了Twitter,ipv4Settings.includedRoutes配置了爱奇艺的一些域名,基于tcp连接之后,访问Twitter没问题,访问爱奇艺的视频却被地区限制,我的服务器在大陆

您好,有个问题想请教下

没事,已经做出来了

SS,目前在规则内的,是根据规则走直连和代理。但是没匹配上规则的,在tunnel里设置了RuleManager(fromRules: userRules,appendDirect: false),我这边还走直连,不走代理

烟雨平生
@2856571872
在console打印出的内容,规则已经写进去了"NEKit.DomainListRule.MatchCriterion.suffix(\"google.com\")"
然后用NEKit和小火箭连接的同一个节点 在bast tranceAPP上显示的路径都不一样
烟雨平生
@2856571872
@zhiYong964941772 @mengke0612
烟雨平生
@2856571872
@zhuhaow
laitongxue000
@laitongxue000

* Building scheme "iOS Framework" in CocoaAsyncSocket.xcodeproj
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/LaiTongXue/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/CocoaAsyncSocket/7.6.5/Build/Intermediates.noindex/ArchiveIntermediates/iOS\ Framework/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/CocoaAsyncSocket.framework/CocoaAsyncSocket /Users/LaiTongXue/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/CocoaAsyncSocket/7.6.5/Build/Products/Release-iphonesimulator/CocoaAsyncSocket.framework/CocoaAsyncSocket -output /Users/LaiTongXue/Downloads/TestDemo/Carthage/Build/iOS/CocoaAsyncSocket.framework/CocoaAsyncSocket

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/mq/93cdzpy54y3_wl6xp59vdg7r0000gn/T/carthage-xcodebuild.vKlzDD.log
求助一下大神,这个一直编译是有问题的

idbeny
@idbeny
@zhiYong964941772 播放视频你是怎么解决的?
烟雨平生
@2856571872
NEKIT macOS 适配Xcode 12 的有没
Omarj
@Omarj
@zhuhaow I'm doing an interesting implementation using NETunnelProvider and everything working fine until iOS 14.0 came out (packetFlow.writePacket return True but browser still waiting for response), I reach out Apple TSI but they said that building the packet data is the issue but I don't see why is that, I'm using IPPacket and working fine with iOS 13.7
do u know any changes that happened to packet data from iOS 13.7 to 14.0 ?
zhuhaow
@zhuhaow
Not sure. Haven’t been working on this for quite a while
Omarj
@Omarj
@zhuhaow can we have a private conversation?
AbhishekChaurasiyaCloudanalogy
@AbhishekChaurasiyaCloudanalogy

We trying to block some network call using OpenVPN and ProxyServer.My vpn has been connect with proxy server 127.0.0.1.But i am not able to block app.
packet tunnel provider is:
let proxyServerPort: UInt16 = 8080;
let proxyServerAddress = "127.0.0.1";
var proxyServer: GCDHTTPProxyServer!

let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress : proxyServerAddress)
networkSettings.mtu = NSNumber(value: 1500)
let proxySettings = NEProxySettings()
proxySettings.httpEnabled = true;
proxySettings.httpServer = NEProxyServer(address: proxyServerAddress, port: Int(proxyServerPort))
proxySettings.httpsEnabled = true;
proxySettings.httpsServer = NEProxyServer(address: proxyServerAddress, port: Int(proxyServerPort))
proxySettings.excludeSimpleHostnames = false;
proxySettings.exceptionList = []
networkSettings.dnsSettings?.matchDomains = [".facebook.de",".facebook.fr",".facebook.net",".fb.com",".fb.me",".friendfeed.com",".instagram.com",".fbcdn.net",".messenger.com",".facebook.com"]
networkSettings.dnsSettings = NEDNSSettings(servers: ["127.0.0.1"])
networkSettings.proxySettings = proxySettings;
RawSocketFactory.TunnelProvider = self

      self.setTunnelNetworkSettings(networkSettings, completionHandler: { error in
          guard error == nil else {

// PacketTunnelProviderLogs.log("Error setting tunnel network settings (error as Any)")
completionHandler(error)
return
}
let newProxyServer = GCDHTTPProxyServer(address: IPAddress(fromString: self.proxyServerAddress),
port: Port(port: self.proxyServerPort))
// newProxyServer.refreshDomains()
self.proxyServer = newProxyServer
do {
try self.proxyServer.start()
// PacketTunnelProviderLogs.log("Proxy server started")
completionHandler(nil)
} catch let proxyError {
// PacketTunnelProviderLogs.log("Error starting proxy server (proxyError)")
completionHandler(proxyError)
}
})

Hughwzc
@Hughwzc

用 carthage 安装依赖,NEkit 的版本和swift版本有冲突
carthage update --platform ios
NEKit报错:
* Building scheme "NEKit-macOS" in NEKit.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/zzs/Workspace/playground/SpechtLite/Carthage/Checkouts/NEKit/NEKit.xcodeproj -scheme NEKit-ios -configuration Release -derivedDataPath /Users/zzs/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/NEKit/0.12.1 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/ch/cnlg67dj1bv467kdsb11pnqh0000gn/T/NEKit SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/zzs/Workspace/playground/SpechtLite/Carthage/Checkouts/NEKit)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/ch/cnlg67dj1bv467kdsb11pnqh0000gn/T/carthage-xcodebuild.i0zHHq.log

Hughwzc
@Hughwzc

@zhuhaow 您好,请问下以下问题如果解决呢?
操作:github下载demo,carthage update --no-use-binaries --platform mac,ios
报错如下:
...ArchiveIntermediates/NEKit-iOS/IntermediateBuildFilesPath/NEKit.build/Release-iphoneos/NEKit-iOS.build/Objects-normal/armv7/HTTPAuthentication.bc
/Users/tedzhang/Desktop/Accelerator/Carthage/Checkouts/NEKit/Carthage/Build/iOS/CocoaAsyncSocket.framework/Modules/module.modulemap:2:19: error: umbrella header 'CocoaAsyncSocket.h' not found
umbrella header "CocoaAsyncSocket.h"
^
/Users/tedzhang/Desktop/Accelerator/Carthage/Checkouts/NEKit/src/RawSocket/GCDTCPSocket.swift:2:8: error: could not build Objective-C module 'CocoaAsyncSocket'
import CocoaAsyncSocket
^

ARCHIVE FAILED

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

MetaSky
@CreatorMetaSky
看来这个频道不活跃了
weisunpeng
@weisunpeng
各位大佬,我想在A手机开个代理,然后B手机通过热点链接到A手机来连代理,请问一下这个怎么搞?
跑了Nekit提供的demo,貌似B手机链接了A手机后无法走代理