xxf098 / go-tun2socks-build Goto Github PK
View Code? Open in Web Editor NEWtun2socks with v2ray & xray support for Android
License: GNU General Public License v3.0
tun2socks with v2ray & xray support for Android
License: GNU General Public License v3.0
mac os
go version go1.17.6 darwin/arm64
执行
$: go get -d ./...
go: github.com/v2fly/v2ray-core/[email protected] (replaced by ../v2ray-core): reading ../v2ray-core/go.mod: open /Users/develop/Documents/workspaces/gowork/src/github.com/xxf098/v2ray-core/go.mod: no such file or directory
查看go.mod文件replace处,是否缺少依赖?lite分支
Hi, I'm checking out v2ray for iOS. I see people recommending repo https://github.com/duanhai/Tun2socks-PacketTunnelDemo for iOS.
but when I checkout that repo, they recommend your repo :)
Anyway just wanted to check with you iOS support. is this about tunFD socket or libs just cant go with iOS?
I'm starting to dig in codes now...
hello, xxf098, can you gave me a contact, if I have some questions 。my email is wheatj#gmail.com, thank you
failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://我的域名/): > dial tcp: lookup 我的域名 on [::1]:53: read udp [::]:54255: i/o timeout transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://我的域名/): > dial tcp: i/o timeout transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://我的域名/): > dial tcp: lookup 我的域名 on [::1]:53: read udp [::]:49887: i/o timeout transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://我的域名/): > dial tcp: i/o timeout transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (wss://我的域名/): > dial tcp: lookup 我的域名 on [::1]:53: read udp [::]:42366: i/o timeout] > common/retry: all retry attempts failed
以下是我得配置
{
"dns": {
"hosts": {
"domain:googleapis.cn": "googleapis.com"
},
"servers": [
"223.5.5.5"
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
},
"sniffing": {
"destOverride": [
"http",
"tls"
],
"enabled": true
},
"tag": "socks"
},
{
"listen": "127.0.0.1",
"port": 10809,
"protocol": "http",
"settings": {
"userLevel": 8
},
"tag": "http"
},
{
"listen": "127.0.0.1",
"port": 10853,
"protocol": "dokodemo-door",
"settings": {
"address": "223.5.5.5",
"network": "tcp,udp",
"port": 53
},
"tag": "dns-in"
}
],
"log": {
"loglevel": "warning"
},
"outbounds": [
{
"mux": {
"concurrency": 8,
"enabled": false
},
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "我的域名",
"port": 443,
"users": [
{
"alterId": 64,
"encryption": "",
"flow": "",
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"level": 8,
"security": "chacha20-poly1305"
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"allowInsecure": false,
"serverName": ""
},
"wsSettings": {
"headers": {
"Host": "我的域名"
},
"path": "/"
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
},
"tag": "block"
},
{
"protocol": "dns",
"tag": "dns-out"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"inboundTag": [
"dns-in"
],
"outboundTag": "dns-out",
"type": "field"
},
{
"ip": [
"223.5.5.5"
],
"outboundTag": "proxy",
"port": "53",
"type": "field"
}
]
}
}
我在网上找到得都是tcp: lookup 域名 on 114.114.114.114:53
而本项目得却出现tcp: lookup 域名 on [::1]:53
不知是我配置问题还是项目得bug
$ make ios
mkdir -p /Users/xxxx/Downloads/go-tun2socks-build/build eval "cd /Users/xxxx/Downloads/go-tun2socks-build/build && gomobile bind -a -ldflags '-s -w -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn' -target=ios -o /Users/xxxx/Downloads/go-tun2socks-build/build/Tun2socks.framework github.com/xxf098/go-tun2socks-build" /bin/sh: gomobile: command not found make: *** [ios] Error 127
$ go get golang.org/x/mobile/cmd/gomobile $ gomobile init
xxxx@Mac-mini ~ % go get golang.org/x/mobile/cmd/gomobile xxxx@Mac-mini ~ % gomobile init zsh: command not found: gomobile
$ go env
OutputGO111MODULE="auto" GOARCH="amd64" GOBIN="" GOCACHE="/Users/xxxx/Library/Caches/go-build" GOENV="/Users/xxxx/Library/Application Support/go/env" GOEXE="" GOFLAGS="-mod=mod" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/xxxx/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/xxxx/go" GOPRIVATE="" GOPROXY="https://goproxy.cn,direct" GOROOT="/usr/local/Cellar/[email protected]/1.16.14/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/[email protected]/1.16.14/libexec/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.16.14" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/xxxx/Downloads/go-tun2socks-build/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tn/jgrzgk7j4mx9szrz97lbnyc00000gn/T/go-build2563246633=/tmp/go-build -gno-record-gcc-switches -fno-common"
i can't build
I want to develop an Android app base on this lib,but i'm not good at scala.
Is there any java/kotlin example code for this lib ? 谢谢老铁
不知道作者为啥要注释掉 DBService 接口,最主要的问题还是这个项目中 kitsunebi-android 中 startV2Ray 定义的是 7 个形参,但是作者实现的是 5 个座椅报错了,有什么解决办法吗?
怎么编译iOS端framework
type QuerySpeed interface {
UpdateTraffic(up int64, down int64)
}
up down 返回的都是 0
不知是我使用错误还是这个方法没法获取统计
Hello, I have a suggestion, how about not using a predefined counter name in the query stats function and allowing it to take a full counter name as a parameter, not just the direct name. Thanks.
As title
I try to build using mac with the following command in terminal..
core/go.mod: no such file or directory
is there an accessible AAR library published to your local maven repository? if none, please upload one. thank you!
这个怎么编译iOS端的库
Is there anyone who used this library as ios framework? is there any ios demo?
Who can help play an iOS framework?
I keep trying to pack it wrong...
我指定了最后一个参数为filesDir.absolutePath。按理应该是 /data/user/0/com.example.xx/files 这个路径啊
我在安卓的raw目录下面有geoip.dat文件,并通过下面的参数把路径传递给Tun2socks了
resources.openRawResource(R.raw.userconfig).use { Tun2socks.startV2Ray(packageFlow,V2rayService(),null,null,it.readBytes(),filesDir.absolutePath) }
为什么会报
I/GoLog: start V instance failed: infra/conf/serial: failed to parse json config > infra/conf: invalid field rule > infra/conf: failed to load GeoIP: cn > infra/conf: failed to load file: geoip.dat > infra/conf: failed to open file: geoip.dat > open /system/bin/geoip.dat: no such file or directory
这样的错误,/system/bin 这个路径从何来的
希望您能提供一个在 iOS 上使用这个项目的 DEMO,以供学习
Hello, what parameters does Tun2socks.querystats() take.
And as a suggestion, how about making a brief documentation for such stuff. By the way, this is so far the best tun2socks implementation with v2ray support
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.