Commit e4ca04a 1 parent d0f7ece commit e4ca04a Copy full SHA for e4ca04a
File tree 3 files changed +6
-3
lines changed
V2rayNG/app/src/main/kotlin/com/v2ray/ang
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ object MigrateManager {
36
36
37
37
// check and remove old
38
38
decodeServerConfig(guid) ? : continue
39
- serverStorage.remove(guid)
39
+ // serverStorage.remove(guid)
40
40
Log .d(ANG_PACKAGE , " migrateServerConfig2Profile-" + config.remarks)
41
41
}
42
42
Log .d(ANG_PACKAGE , " migrateServerConfig2Profile-end" )
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ object V2RayServiceManager {
65
65
if (v2rayPoint.isRunning) return
66
66
val guid = MmkvManager .getSelectServer() ? : return
67
67
val config = MmkvManager .decodeServerConfig(guid) ? : return
68
- if (! Utils .isValidUrl(config.server) && ! Utils .isValidUrl (config.server)) return
68
+ if (! Utils .isValidUrl(config.server) && ! Utils .isIpAddress (config.server)) return
69
69
// val result = V2rayConfigUtil.getV2rayConfig(context, guid)
70
70
// if (!result.status) return
71
71
Original file line number Diff line number Diff line change @@ -159,8 +159,11 @@ object Utils {
159
159
/* *
160
160
* is ip address
161
161
*/
162
- fun isIpAddress (value : String ): Boolean {
162
+ fun isIpAddress (value : String? ): Boolean {
163
163
try {
164
+ if (value.isNullOrEmpty()) {
165
+ return false
166
+ }
164
167
var addr = value
165
168
if (addr.isEmpty() || addr.isBlank()) {
166
169
return false
You can’t perform that action at this time.
0 commit comments