Skip to content

Commit 61e736d

Browse files
author
esdeathlove
committed
refine icon,update ssr-libev
1 parent 531da7c commit 61e736d

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks"
3-
android:versionCode="294"
4-
android:versionName="3.3.9">
3+
android:versionCode="296"
4+
android:versionName="3.3.9.1">
55

66
<uses-permission android:name="android.permission.INTERNET"/>
77
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

src/main/res/drawable/ic_click.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
android:viewportHeight="24.0">
88
<path
99
android:fillColor="#FF000000"
10-
android:pathData="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-1.41-6.8-6.8v.02C4.42 6.45 3 9.05 3 12c0 4.97 4.02 9 9 9 4.97 0 9-4.03 9-9s-4.03-9-9-9h-1zm7 9c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zM6 12c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z"/>
10+
android:pathData="M7 2v11h3v9l7-12h-4l4-8z"/>
1111
</vector>

src/main/res/drawable/ic_click_white.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
android:viewportHeight="24.0">
88
<path
99
android:fillColor="#FFFFFFFF"
10-
android:pathData="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-1.41-6.8-6.8v.02C4.42 6.45 3 9.05 3 12c0 4.97 4.02 9 9 9 4.97 0 9-4.03 9-9s-4.03-9-9-9h-1zm7 9c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zM6 12c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z"/>
10+
android:pathData="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/>
1111
</vector>

src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class ShadowsocksNatService extends BaseService {
7575
var pdnsdProcess: GuardedProcess = _
7676
var su: Shell.Interactive = _
7777
var proxychains_enable: Boolean = false
78+
var host_arg = ""
7879

7980
def startShadowsocksDaemon() {
8081

@@ -88,6 +89,7 @@ class ShadowsocksNatService extends BaseService {
8889
val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-local", "-x"
8990
, "-b" , "127.0.0.1"
9091
, "-t" , "600"
92+
, "--host", host_arg
9193
, "-P", getApplicationInfo.dataDir
9294
, "-c" , getApplicationInfo.dataDir + "/ss-local-nat.conf")
9395

@@ -120,6 +122,7 @@ class ShadowsocksNatService extends BaseService {
120122
val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-local"
121123
, "-u"
122124
, "-t" , "60"
125+
, "--host", host_arg
123126
, "-b" , "127.0.0.1"
124127
, "-l" , (profile.localPort + 53).toString
125128
, "-P" , getApplicationInfo.dataDir
@@ -151,7 +154,8 @@ class ShadowsocksNatService extends BaseService {
151154
})
152155

153156
val cmdBuf = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-local"
154-
, "-t" , "10"
157+
, "-t" , "60"
158+
, "--host", host_arg
155159
, "-b" , "127.0.0.1"
156160
, "-l" , (profile.localPort + 63).toString
157161
, "-P", getApplicationInfo.dataDir
@@ -385,6 +389,7 @@ class ShadowsocksNatService extends BaseService {
385389
proxychains_enable = false
386390
}
387391

392+
host_arg = profile.host
388393
if (!Utils.isNumeric(profile.host)) Utils.resolve(profile.host, enableIPv6 = true) match {
389394
case Some(a) => profile.host = a
390395
case None => throw NameNotResolvedException()

src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
7272
var pdnsdProcess: GuardedProcess = _
7373
var tun2socksProcess: GuardedProcess = _
7474
var proxychains_enable: Boolean = false
75+
var host_arg = ""
7576

7677
override def onBind(intent: Intent): IBinder = {
7778
val action = intent.getAction
@@ -164,6 +165,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
164165
killProcesses()
165166

166167
// Resolve the server address
168+
host_arg = profile.host
167169
if (!Utils.isNumeric(profile.host)) Utils.resolve(profile.host, enableIPv6 = true) match {
168170
case Some(addr) => profile.host = addr
169171
case None => throw NameNotResolvedException()
@@ -213,6 +215,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
213215
var cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-local", "-V", "-U", "-x"
214216
, "-b", "127.0.0.1"
215217
, "-t", "600"
218+
, "--host", host_arg
216219
, "-P", getApplicationInfo.dataDir
217220
, "-c", getApplicationInfo.dataDir + "/ss-local-udp-vpn.conf")
218221

@@ -247,6 +250,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
247250
val cmd = ArrayBuffer[String](getApplicationInfo.dataDir + "/ss-local", "-V", "-x"
248251
, "-b", "127.0.0.1"
249252
, "-t", "600"
253+
, "--host", host_arg
250254
, "-P", getApplicationInfo.dataDir
251255
, "-c", getApplicationInfo.dataDir + "/ss-local-vpn.conf")
252256

@@ -290,6 +294,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
290294
, "-V"
291295
, "-u"
292296
, "-t", "60"
297+
, "--host", host_arg
293298
, "-b", "127.0.0.1"
294299
, "-P", getApplicationInfo.dataDir
295300
, "-c", getApplicationInfo.dataDir + "/ss-tunnel-vpn.conf")

0 commit comments

Comments
 (0)