Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Jan 16, 2022
1 parent 56be7af commit 961ec18
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ fun buildV2RayConfig(
}
}
}
if (currentDomainStrategy == "AsIS") {
if (currentDomainStrategy == "AsIs") {
currentDomainStrategy = "UseIP"
}
} else if (bean is SSHBean) {
Expand Down Expand Up @@ -869,7 +869,7 @@ fun buildV2RayConfig(
type = "field"
inboundTag = listOf(pastInboundTag)
outboundTag = tagIn
if (currentOutbound.domainStrategy == "AsIS") {
if (currentOutbound.domainStrategy == "AsIs") {
currentOutbound.domainStrategy = "UseIP"
}
})
Expand Down Expand Up @@ -1204,7 +1204,7 @@ fun buildV2RayConfig(
val bypassIP = HashSet<String>()
val bypassDomain = HashSet<String>()

(proxies + extraProxies.values.flatten()).filter { !it.requireBean().isChain }.forEach {
(proxies + extraProxies.values.flatten()).forEach {
it.requireBean().apply {
if (!serverAddress.isIpAddress()) {
bypassDomain.add("full:$serverAddress")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fun parseNaive(link: String): NaiveBean {
fun NaiveBean.toUri(proxyOnly: Boolean = false): String {
val builder = Libcore.newURL(if (proxyOnly) proto else "naive+$proto")
builder.host = serverAddress
builder.port = serverPort
builder.port = finalPort
if (username.isNotBlank()) {
builder.username = username
if (password.isNotBlank()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public void deserialize(ByteBufferInput input) {
}
}

@Override
public void applyFeatureSettings(AbstractBean other) {
if (!(other instanceof ShadowsocksBean)) return;
ShadowsocksBean bean = ((ShadowsocksBean) other);
bean.experimentReducedIvHeadEntropy = experimentReducedIvHeadEntropy;
}

@NotNull
@Override
public ShadowsocksBean clone() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ fun PluginConfiguration.fixInvalidParams() {

}

if (selected == "obfs-local") {
val options = pluginsOptions["obfs-local"]
if (options != null) {
if (options.containsKey("mode")) {
options["obfs"] = options["mode"]
options.remove("mode")
}
if (options.containsKey("host")) {
options["obfs-host"] = options["host"]
options.remove("host")
}
}
}

}

fun ShadowsocksBean.fixInvalidParams() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ object SIP008Updater : GroupUpdater() {
for (profile in servers) {
val bean = profile.parseShadowsocks()
appendExtraInfo(profile, bean)
profiles.add(bean)
profiles.add(bean.applyDefaultValues())
}

if (subscription.forceResolve) forceResolve(profiles, proxyGroup.id)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/global_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

<PreferenceCategory app:title="@string/cag_dns">
<io.nekohasekai.sagernet.widget.NonBlackEditTextPreference
app:defaultValue="https://dns.google/dns-query"
app:defaultValue="tls://dns.google"
app:icon="@drawable/ic_action_dns"
app:key="remoteDns"
app:title="@string/remote_dns"
Expand All @@ -195,7 +195,7 @@
app:key="useLocalDnsAsDirectDns"
app:title="@string/use_local_dns_as_direct_dns" />
<io.nekohasekai.sagernet.widget.NonBlackEditTextPreference
app:defaultValue="https+local://doh.pub/dns-query"
app:defaultValue="tls+local://dot.pub"
app:key="directDns"
app:title="@string/direct_dns"
app:useSimpleSummaryProvider="true" />
Expand Down
2 changes: 1 addition & 1 deletion library/core
Submodule core updated 4 files
+2 −2 go.mod
+2 −2 go.sum
+10 −3 ssr.go
+6 −4 v2ray.go
4 changes: 2 additions & 2 deletions sager.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGE_NAME=io.nekohasekai.sagernet
VERSION_NAME=0.7-beta04
VERSION_CODE=146
VERSION_NAME=0.7-beta05
VERSION_CODE=147

NAIVE_VERSION_NAME=97.0.4692.71-2
NAIVE_VERSION=10
Expand Down

0 comments on commit 961ec18

Please sign in to comment.