mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
HTTP - Allow Transparent
This commit is contained in:
parent
6b0c9a5fad
commit
59a84e844c
2 changed files with 11 additions and 1 deletions
|
@ -2601,9 +2601,14 @@ Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass {
|
|||
};
|
||||
|
||||
Inbound.HttpSettings = class extends Inbound.Settings {
|
||||
constructor(protocol, accounts = [new Inbound.HttpSettings.HttpAccount()]) {
|
||||
constructor(
|
||||
protocol,
|
||||
accounts = [new Inbound.HttpSettings.HttpAccount()],
|
||||
allowTransparent = false,
|
||||
) {
|
||||
super(protocol);
|
||||
this.accounts = accounts;
|
||||
this.allowTransparent = allowTransparent;
|
||||
}
|
||||
|
||||
addAccount(account) {
|
||||
|
@ -2618,12 +2623,14 @@ Inbound.HttpSettings = class extends Inbound.Settings {
|
|||
return new Inbound.HttpSettings(
|
||||
Protocols.HTTP,
|
||||
json.accounts.map(account => Inbound.HttpSettings.HttpAccount.fromJson(account)),
|
||||
json.allowTransparent,
|
||||
);
|
||||
}
|
||||
|
||||
toJson() {
|
||||
return {
|
||||
accounts: Inbound.HttpSettings.toJsonArray(this.accounts),
|
||||
allowTransparent: this.allowTransparent,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -19,5 +19,8 @@
|
|||
</template>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
<a-form-item label="Allow Transparent">
|
||||
<a-switch v-model="inbound.settings.allowTransparent" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in a new issue