Skip to content

Commit

Permalink
Add CdnHttpHost config option. (#16)
Browse files Browse the repository at this point in the history
* Add CdnHttpHost config option.

* Rename CdnHttpHost to CDNOriginHost
  • Loading branch information
notsure2 authored Dec 12, 2020
1 parent cb8f969 commit ba4adbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class ConfigFragment : PreferenceFragment() {
this._options = options
val ary = arrayOf(Pair("ProxyMethod","shadowsocks"), Pair("EncryptionMethod","plain"),
Pair("Transport", "direct"), Pair("UID", ""), Pair("PublicKey",""), Pair("ServerName", "bing.com"),
Pair("NumConn","4"), Pair("BrowserSig", "chrome"), Pair("StreamTimeout","300"),
Pair("KeepAlive", "0"))
Pair("CDNOriginHost", ""), Pair("NumConn","4"), Pair("BrowserSig", "chrome"),
Pair("StreamTimeout","300"), Pair("KeepAlive", "0"))
for (element in ary) {
val key = element.first
val defaultValue = element.second
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<resources>
<string name="app_name">Cloak</string>
<string name="cloak_server_name">Server Name</string>
<string name="cloak_cdn_origin_host">CDN mode HTTP Origin Override</string>
<string name="cloak_uid">UID</string>
<string name="cloak_public_key">Public Key</string>
<string name="cloak_num_conn">Number of Connections</string>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/xml/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
android:key="ServerName"
android:persistent="false"
android:title="@string/cloak_server_name" />
<EditTextPreference
android:key="CDNOriginHost"
android:persistent="false"
android:title="@string/cloak_cdn_origin_host" />
<ListPreference
android:key="BrowserSig"
android:persistent="false"
Expand Down

0 comments on commit ba4adbf

Please sign in to comment.