mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 17:48:58 +08:00
Now an error will be thrown if a required field of a proxy is missing
This commit is contained in:
parent
83504d42c4
commit
4945826f2d
4
backend/dist/sub-store-parser.loon.min.js
vendored
4
backend/dist/sub-store-parser.loon.min.js
vendored
File diff suppressed because one or more lines are too long
@ -34,6 +34,9 @@ function shadowsocks(proxy) {
|
||||
append(`,password=${proxy.password}`);
|
||||
|
||||
// obfs
|
||||
if (needTls(proxy)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
if (isPresent(proxy, 'plugin')) {
|
||||
if (proxy.plugin === 'obfs') {
|
||||
const opts = proxy['plugin-opts'];
|
||||
@ -187,6 +190,9 @@ function vmess(proxy) {
|
||||
append(`,password=${proxy.uuid}`);
|
||||
|
||||
// obfs
|
||||
if (needTls(proxy)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
if (isPresent(proxy, 'network')) {
|
||||
if (proxy.network === 'ws') {
|
||||
if (proxy.tls) append(`,obfs=wss`);
|
||||
|
@ -7,6 +7,9 @@ export class Result {
|
||||
}
|
||||
|
||||
append(data) {
|
||||
if (typeof data === 'undefined') {
|
||||
throw new Error('required field is missing');
|
||||
}
|
||||
this.output.push(data);
|
||||
}
|
||||
|
||||
|
4
backend/sub-store.min.js
vendored
4
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user