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

Commit af48e33

Browse files
author
icymind
committed
minor fix
1 parent 9be6b5e commit af48e33

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/renderer/components/Manage.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const templateProfile = {
109109
'timeout': 300,
110110
'method': 'chacha20',
111111
'fast_open': false,
112-
'plugin': 'obfs-local',
112+
'plugin': '',
113113
'plugin_opts': 'obfs=http;obfs-host=www.bing.com'
114114
},
115115
'shadowsocksr': {
@@ -273,7 +273,13 @@ export default {
273273
this.showProfileEditor = true
274274
},
275275
editProfile: function (index) {
276-
this.editingClone = Object.assign({}, this.vrouter.config.profiles[index])
276+
const profile = Object.assign({}, this.vrouter.config.profiles[index])
277+
;['shadowsocks', 'shadowsocksr', 'kcptun'].forEach(proxy => {
278+
if (!profile[proxy]) {
279+
profile[proxy] = Object.assign({}, templateProfile[proxy])
280+
}
281+
})
282+
this.editingClone = profile
277283
// 编辑配置: index >= 0; 新建配置: index = -1; 导入配置: index = -2
278284
this.editingClone.index = index
279285
this.showProfileEditor = true

0 commit comments

Comments
 (0)