mirror of
https://github.com/2dust/v2rayNG.git
synced 2025-06-28 12:19:52 +00:00
Fix log for plugin
This commit is contained in:
parent
fff6ab30e6
commit
69e27ed3bb
1 changed files with 5 additions and 1 deletions
|
@ -28,13 +28,17 @@ object PluginUtil {
|
||||||
fun runPlugin(context: Context, config: ProfileItem?, socksPort: Int?) {
|
fun runPlugin(context: Context, config: ProfileItem?, socksPort: Int?) {
|
||||||
Log.i(AppConfig.TAG, "Starting plugin execution")
|
Log.i(AppConfig.TAG, "Starting plugin execution")
|
||||||
|
|
||||||
if (config == null || socksPort == null) {
|
if (config == null) {
|
||||||
Log.w(AppConfig.TAG, "Cannot run plugin: config is null")
|
Log.w(AppConfig.TAG, "Cannot run plugin: config is null")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (config.configType == EConfigType.HYSTERIA2) {
|
if (config.configType == EConfigType.HYSTERIA2) {
|
||||||
|
if (socksPort == null) {
|
||||||
|
Log.w(AppConfig.TAG, "Cannot run plugin: socksPort is null")
|
||||||
|
return
|
||||||
|
}
|
||||||
Log.i(AppConfig.TAG, "Running Hysteria2 plugin")
|
Log.i(AppConfig.TAG, "Running Hysteria2 plugin")
|
||||||
val configFile = genConfigHy2(context, config, socksPort) ?: return
|
val configFile = genConfigHy2(context, config, socksPort) ?: return
|
||||||
val cmd = genCmdHy2(context, configFile)
|
val cmd = genCmdHy2(context, configFile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue