Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 3d58902

Browse files
author
icymind
committed
fix proxy config.json error
1 parent 436ad10 commit 3d58902

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

src/renderer/components/Manage/ProfileEditor/ProxiesForm/SsForm.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
<input type="text" v-model="shadowsocks.method">
3232
</div>
3333
<div class="four wide field">
34-
<label for="">Fast Open</label>
35-
<input type="text" v-model="shadowsocks.fast_open">
34+
<label>Fast Open</label>
35+
<select class="ui dropdown" v-model="fastOpen">
36+
<option>true</option>
37+
<option>false</option>
38+
</select>
3639
</div>
3740
</div>
3841
</div>
@@ -46,7 +49,17 @@ Vue.use(VeeValidate, { inject: false })
4649
export default {
4750
name: 'ss-form',
4851
props: ['shadowsocks'],
49-
inject: ['$validator']
52+
inject: ['$validator'],
53+
computed: {
54+
fastOpen: {
55+
get: function () {
56+
return this.shadowsocks.fast_open.toString()
57+
},
58+
set: function (value) {
59+
this.shadowsocks.fast_open = Boolean(value)
60+
}
61+
}
62+
}
5063
}
5164
</script>
5265

src/renderer/components/Manage/ProfileEditor/ProxiesForm/SsrForm.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@
5151
<input type="text" v-model="shadowsocksr.obfs_param">
5252
</div>
5353
<div class="four wide field">
54-
<label for="">Fast Open</label>
55-
<input type="text" v-model="shadowsocksr.fast_open">
54+
<label>Fast Open</label>
55+
<select class="ui dropdown" v-model="fastOpen">
56+
<option>true</option>
57+
<option>false</option>
58+
</select>
5659
</div>
5760
<div class="four wide field">
5861
<label for="">Others</label>
@@ -66,7 +69,17 @@
6669
<script>
6770
export default {
6871
name: 'ssr-form',
69-
props: ['shadowsocksr']
72+
props: ['shadowsocksr'],
73+
computed: {
74+
fastOpen: {
75+
get: function () {
76+
return this.shadowsocksr.fast_open.toString()
77+
},
78+
set: function (value) {
79+
this.shadowsocksr.fast_open = Boolean(value)
80+
}
81+
}
82+
}
7083
}
7184
</script>
7285

src/renderer/lib/generator.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ async function getTunnelDnsCfgFrom (profile, proxiesInfo) {
124124
}
125125
cfg.local_port = proxiesInfo.tunnelDns.localPort
126126
cfg.mode = 'udp_only'
127+
// fast_open not work in ss-tunnel
128+
cfg.fast_open = false
127129
cfg.tunnel_address = profile.dnsServer || '8.8.8.8:53'
128130
return cfg
129131
}
@@ -232,7 +234,7 @@ async function genServiceFileHelper (proxy, proxies, proxiesInfo, remoteCfgDirPa
232234
function genWatchdogFileHelper (proxy, proxies, proxiesInfo) {
233235
let binName = proxiesInfo[proxy].binName
234236
let serviceName = proxiesInfo[proxy].serviceName
235-
if (/^(tunnelDns|relayUDP)$/ig.test(proxies)) {
237+
if (/^(tunnelDns|relayUDP)$/ig.test(proxy)) {
236238
binName = /ssr/ig.test(proxies) ? binName.shadowsocksr : binName.shadowsocks
237239
serviceName = /ssr/ig.test(proxies) ? serviceName.shadowsocksr : serviceName.shadowsocks
238240
}

0 commit comments

Comments
 (0)