Update init with xudp basekey
This commit is contained in:
1 parent
ead3de4d31
commit
2fe4ac1d45
3 files changed
+154
-206
No files matched your search
+6
-2
@@ -30,6 +30,7 @@ import (
|
||||
|
||||
const (
|
||||
v2Asset = "xray.location.asset"
|
||||
xudpBaseKey = "xray.xudp.basekey"
|
||||
)
|
||||
|
||||
/*V2RayPoint V2Ray Point Server
|
||||
@@ -180,12 +181,15 @@ func (v *V2RayPoint) MeasureDelay() (int64, error) {
|
||||
}
|
||||
|
||||
// InitV2Env set v2 asset path
|
||||
func InitV2Env(envPath string) {
|
||||
func InitV2Env(envPath string, key string) {
|
||||
//Initialize asset API, Since Raymond Will not let notify the asset location inside Process,
|
||||
//We need to set location outside V2Ray
|
||||
if len(envPath) > 0 {
|
||||
os.Setenv(v2Asset, envPath)
|
||||
}
|
||||
if len(key) > 0 {
|
||||
os.Setenv(xudpBaseKey, key)
|
||||
}
|
||||
|
||||
//Now we handle read, fallback to gomobile asset (apk assets)
|
||||
v2filesystem.NewFileReader = func(path string) (io.ReadCloser, error) {
|
||||
@@ -248,7 +252,7 @@ func NewV2RayPoint(s V2RayVPNServiceSupportsSet, adns bool) *V2RayPoint {
|
||||
This func will return libv2ray binding version and V2Ray version used.
|
||||
*/
|
||||
func CheckVersionX() string {
|
||||
var version = 24
|
||||
var version = 25
|
||||
return fmt.Sprintf("Lib v%d, Xray-core v%s", version, v2core.Version())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user