mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-09-26 21:01:46 +08:00
修订文档,aar编译参数
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
## 最新消息
|
||||
|
||||
vsb项目已经支持了安卓vpn功能:
|
||||
https://github.com/e1732a364fed/vsb/releases/tag/v0.0.2
|
||||
https://github.com/e1732a364fed/vsb/releases/tag/v0.0.3
|
||||
|
||||
# verysimple
|
||||
|
||||
verysimple, 实际上 谐音来自 V2ray Simple (显然只适用于汉语母语者), 意思就是极简.
|
||||
|
@@ -52,7 +52,7 @@ defaultOutFn :=${prefix}${defaultSuffix}
|
||||
BUILD_VERSION :=[ commit: $(shell git rev-parse --short HEAD), all_go_files_md5: $(shell $(md5cmdline)), tags:$(tags) ]
|
||||
|
||||
|
||||
cmd:=go build -tags "androidNotAAR $(tags)" -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o
|
||||
cmd:=go build -tags "$(tags)" -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o
|
||||
|
||||
|
||||
ifdef PACK
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
prefix :=verysimple
|
||||
|
||||
cmd:=go build -tags "androidNotAAR $(tags)" -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o
|
||||
cmd:=go build -tags "$(tags)" -trimpath -ldflags "-X 'main.Version=${BUILD_VERSION}' -s -w -buildid=" -o
|
||||
|
||||
|
||||
ifdef PACK
|
||||
|
@@ -1,6 +1,8 @@
|
||||
|
||||
若要生成用于安卓app的aar,见 machine/genaar.sh
|
||||
|
||||
其用了 androidAAR 这个 build tag 来使用 machine/forAndroid.go文件
|
||||
|
||||
debian上,先运行
|
||||
|
||||
```
|
||||
@@ -15,4 +17,4 @@ ubuntu22安装 sdkmanager: apt install sdkmanager
|
||||
|
||||
其他平台: https://developer.android.com/studio#command-tools 下载安装
|
||||
|
||||
安卓的aar用于vsb项目
|
||||
安卓的aar可用于vsb项目
|
@@ -33,13 +33,9 @@ api在不复杂时,可以使用纯空格、换行符 分隔的字符串形式
|
||||
1. 生成uuid【已实现】
|
||||
2. 生成随机证书 以及对应私钥【已实现】
|
||||
|
||||
上面的已实现是说交互模式已实现,apiServer的话目前只实现了基本状态查询功能
|
||||
|
||||
# 原始函数、命令行 与 API的关系
|
||||
|
||||
每一个API都尽量有对应的原始golang函数, 然后命令行命令与 api都会调用该原始函数。
|
||||
每一个API都尽量有唯一对应的golang函数, 然后命令行命令与 api都会调用同一个对应的函数。
|
||||
|
||||
我们每一个API,在API功能允许的情况下,都应该要有对应的命令行参数,可在程序刚运行时就返回一个字符串结果
|
||||
|
||||
本作规定,原始函数、命令行 与 API 这三个功能 的go文件 全部放在 项目根目录。
|
||||
我们每一个API,在API功能允许的情况下 要有对应的命令行参数,可在程序刚运行时就返回一个字符串结果
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
//go:build android && !androidNotAAR
|
||||
//go:build android && androidAAR
|
||||
|
||||
package machine
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
go get golang.org/x/mobile/bind
|
||||
gomobile bind -o xx.aar -androidapi 19 -target=android -ldflags "-s -w -buildid=" -trimpath .
|
||||
gomobile bind -o xx.aar -androidapi 19 -target=android -tags androidAAR -ldflags "-s -w -buildid=" -trimpath .
|
||||
go mod tidy
|
@@ -8,14 +8,6 @@ import (
|
||||
"github.com/e1732a364fed/v2ray_simple/utils"
|
||||
)
|
||||
|
||||
// 用于 tproxy 或 tun/tap 这种 只有 网络层 和传输层的情况
|
||||
// type LesserConf struct {
|
||||
// Addr string
|
||||
// Tag string
|
||||
// UseSniffing bool
|
||||
// Fullcone bool
|
||||
// }
|
||||
|
||||
// CommonConf is the common part of ListenConf and DialConf.
|
||||
type CommonConf struct {
|
||||
Tag string `toml:"tag"` //可选
|
||||
|
Reference in New Issue
Block a user