Commit e6d7a085 authored by Mygod's avatar Mygod

Suggest different local ports automatically in MU mode

Refine #885
parent 4da89cd1
......@@ -59,11 +59,11 @@ import android.util.Log
import android.view.{View, ViewGroup}
import android.widget._
import com.github.jorgecastilloprz.FABProgressCircle
import com.github.shadowsocks.ShadowsocksApplication.app
import com.github.shadowsocks.aidl.IShadowsocksServiceCallback
import com.github.shadowsocks.database._
import com.github.shadowsocks.utils.CloseUtils._
import com.github.shadowsocks.utils._
import com.github.shadowsocks.ShadowsocksApplication.app
import com.google.android.gms.ads.{AdRequest, AdSize, AdView}
import eu.chainfire.libsuperuser.Shell
......
......@@ -41,6 +41,7 @@ package com.github.shadowsocks.database
import java.util.Locale
import android.os.Binder
import android.util.Base64
import com.j256.ormlite.field.{DataType, DatabaseField}
......@@ -54,8 +55,9 @@ class Profile {
@DatabaseField
var host: String = ""
// hopefully hashCode = mHandle doesn't change, currently this is true from KitKat to Nougat
@DatabaseField
var localPort: Int = 1080
var localPort: Int = 1080 + Binder.getCallingUserHandle.hashCode
@DatabaseField
var remotePort: Int = 8388
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment