mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-20 07:00:05 +08:00
feat: Cache file
This commit is contained in:
parent
86050082fe
commit
0c3c42aa74
@ -1,11 +1,7 @@
|
|||||||
package io.nekohasekai.sagernet.fmt
|
package io.nekohasekai.sagernet.fmt
|
||||||
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import io.nekohasekai.sagernet.IPv6Mode
|
import io.nekohasekai.sagernet.*
|
||||||
import io.nekohasekai.sagernet.Key
|
|
||||||
import io.nekohasekai.sagernet.R
|
|
||||||
import io.nekohasekai.sagernet.SagerNet
|
|
||||||
import io.nekohasekai.sagernet.TunImplementation
|
|
||||||
import io.nekohasekai.sagernet.bg.VpnService
|
import io.nekohasekai.sagernet.bg.VpnService
|
||||||
import io.nekohasekai.sagernet.database.DataStore
|
import io.nekohasekai.sagernet.database.DataStore
|
||||||
import io.nekohasekai.sagernet.database.ProxyEntity
|
import io.nekohasekai.sagernet.database.ProxyEntity
|
||||||
@ -170,7 +166,12 @@ fun buildConfig(
|
|||||||
clash_api = ClashAPIOptions().apply {
|
clash_api = ClashAPIOptions().apply {
|
||||||
external_controller = "127.0.0.1:9090"
|
external_controller = "127.0.0.1:9090"
|
||||||
external_ui = "../files/yacd"
|
external_ui = "../files/yacd"
|
||||||
cache_file = "../cache/clash.db"
|
}
|
||||||
|
|
||||||
|
cache_file = CacheFile().apply {
|
||||||
|
enabled = true
|
||||||
|
store_fakeip = true
|
||||||
|
path = "../cache/clash.db"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ public class SingBoxOptions {
|
|||||||
public RouteOptions route;
|
public RouteOptions route;
|
||||||
|
|
||||||
public ExperimentalOptions experimental;
|
public ExperimentalOptions experimental;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// paste generate output here
|
// paste generate output here
|
||||||
@ -56,16 +57,6 @@ public class SingBoxOptions {
|
|||||||
|
|
||||||
public String default_mode;
|
public String default_mode;
|
||||||
|
|
||||||
public Boolean store_mode;
|
|
||||||
|
|
||||||
public Boolean store_selected;
|
|
||||||
|
|
||||||
public Boolean store_fakeip;
|
|
||||||
|
|
||||||
public String cache_file;
|
|
||||||
|
|
||||||
public String cache_id;
|
|
||||||
|
|
||||||
// Generate note: option type: public List<String> ModeList;
|
// Generate note: option type: public List<String> ModeList;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -304,10 +295,24 @@ public class SingBoxOptions {
|
|||||||
|
|
||||||
public V2RayAPIOptions v2ray_api;
|
public V2RayAPIOptions v2ray_api;
|
||||||
|
|
||||||
|
public CacheFile cache_file;
|
||||||
|
|
||||||
public DebugOptions debug;
|
public DebugOptions debug;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class CacheFile extends SingBoxOption {
|
||||||
|
|
||||||
|
public Boolean enabled;
|
||||||
|
|
||||||
|
public Boolean store_fakeip;
|
||||||
|
|
||||||
|
public String path;
|
||||||
|
|
||||||
|
public String cache_id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static class HysteriaInboundOptions extends SingBoxOption {
|
public static class HysteriaInboundOptions extends SingBoxOption {
|
||||||
|
|
||||||
// Generate note: nested type ListenOptions
|
// Generate note: nested type ListenOptions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user