core: fix presets in relay.js

This commit is contained in:
Micooz 2017-08-21 22:15:02 +08:00
parent b648bcd300
commit 81a25e4c35

@ -78,7 +78,7 @@ export class Relay extends EventEmitter {
this._bsocket.setTimeout(__TIMEOUT__);
let presets = __PRESETS__;
// prepend "proxy" preset to the top of presets on client side
if (__IS_CLIENT__ && presets[0].name !== 'proxy') {
if (__IS_CLIENT__ && !['proxy', 'tunnel'].includes(presets[0].name)) {
presets = [{name: 'proxy'}].concat(presets);
}
// add "tracker" preset to the preset list on both sides