mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-26 21:06:54 +00:00
Compare commits
2 commits
6879a8fbcb
...
978755960f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
978755960f | ||
![]() |
9b51e9a5c5 |
6 changed files with 38 additions and 6 deletions
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
|
|
|
@ -919,12 +919,14 @@ Outbound.FreedomSettings.Fragment = class extends CommonClass {
|
||||||
constructor(
|
constructor(
|
||||||
packets = '1-3',
|
packets = '1-3',
|
||||||
length = '',
|
length = '',
|
||||||
interval = ''
|
interval = '',
|
||||||
|
maxSplit = ''
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.packets = packets;
|
this.packets = packets;
|
||||||
this.length = length;
|
this.length = length;
|
||||||
this.interval = interval;
|
this.interval = interval;
|
||||||
|
this.maxSplit = maxSplit;
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromJson(json = {}) {
|
static fromJson(json = {}) {
|
||||||
|
@ -932,6 +934,7 @@ Outbound.FreedomSettings.Fragment = class extends CommonClass {
|
||||||
json.packets,
|
json.packets,
|
||||||
json.length,
|
json.length,
|
||||||
json.interval,
|
json.interval,
|
||||||
|
json.maxSplit
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -940,12 +943,14 @@ Outbound.FreedomSettings.Noise = class extends CommonClass {
|
||||||
constructor(
|
constructor(
|
||||||
type = 'rand',
|
type = 'rand',
|
||||||
packet = '10-20',
|
packet = '10-20',
|
||||||
delay = '10-16'
|
delay = '10-16',
|
||||||
|
applyTo = 'ip'
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.packet = packet;
|
this.packet = packet;
|
||||||
this.delay = delay;
|
this.delay = delay;
|
||||||
|
this.applyTo = applyTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromJson(json = {}) {
|
static fromJson(json = {}) {
|
||||||
|
@ -953,6 +958,7 @@ Outbound.FreedomSettings.Noise = class extends CommonClass {
|
||||||
json.type,
|
json.type,
|
||||||
json.packet,
|
json.packet,
|
||||||
json.delay,
|
json.delay,
|
||||||
|
json.applyTo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -961,6 +967,7 @@ Outbound.FreedomSettings.Noise = class extends CommonClass {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
packet: this.packet,
|
packet: this.packet,
|
||||||
delay: this.delay,
|
delay: this.delay,
|
||||||
|
applyTo: this.applyTo
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
<a-form-item label='Interval'>
|
<a-form-item label='Interval'>
|
||||||
<a-input v-model.trim="outbound.settings.fragment.interval"></a-input>
|
<a-input v-model.trim="outbound.settings.fragment.interval"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label='Max Split'>
|
||||||
|
<a-input v-model.trim="outbound.settings.fragment.maxSplit"></a-input>
|
||||||
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Switch for Noises -->
|
<!-- Switch for Noises -->
|
||||||
|
@ -75,6 +78,11 @@
|
||||||
<a-form-item label='Delay'>
|
<a-form-item label='Delay'>
|
||||||
<a-input v-model.trim="noise.delay"></a-input>
|
<a-input v-model.trim="noise.delay"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label='Apply To'>
|
||||||
|
<a-select v-model="noise.applyTo" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||||
|
<a-select-option v-for="s in ['ip','ipv4','ipv6']" :value="s">[[ s ]]</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -207,7 +207,7 @@
|
||||||
settings: {
|
settings: {
|
||||||
domainStrategy: "AsIs",
|
domainStrategy: "AsIs",
|
||||||
noises: [
|
noises: [
|
||||||
{ type: "rand", packet: "10-20", delay: "10-16" },
|
{ type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -397,7 +397,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addNoise() {
|
addNoise() {
|
||||||
const newNoise = { type: "rand", packet: "10-20", delay: "10-16" };
|
const newNoise = { type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" };
|
||||||
this.noisesArray = [...this.noisesArray, newNoise];
|
this.noisesArray = [...this.noisesArray, newNoise];
|
||||||
},
|
},
|
||||||
removeNoise(index) {
|
removeNoise(index) {
|
||||||
|
@ -420,6 +420,11 @@
|
||||||
updatedNoises[index] = { ...updatedNoises[index], delay: value };
|
updatedNoises[index] = { ...updatedNoises[index], delay: value };
|
||||||
this.noisesArray = updatedNoises;
|
this.noisesArray = updatedNoises;
|
||||||
},
|
},
|
||||||
|
updateNoiseApplyTo(index, value) {
|
||||||
|
const updatedNoises = [...this.noisesArray];
|
||||||
|
updatedNoises[index] = { ...updatedNoises[index], applyTo: value };
|
||||||
|
this.noisesArray = updatedNoises;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
fragment: {
|
fragment: {
|
||||||
|
|
|
@ -90,6 +90,18 @@
|
||||||
placeholder="10-20"></a-input>
|
placeholder="10-20"></a-input>
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
|
<a-setting-list-item paddings="small">
|
||||||
|
<template #title>ApplyTo</template>
|
||||||
|
<template #control>
|
||||||
|
<a-select :value="noise.applyTo" :style="{ width: '100%' }"
|
||||||
|
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||||
|
@change="(value) => updateNoiseApplyTo(index, value)">
|
||||||
|
<a-select-option :value="p" :label="p" v-for="p in ['ip', 'ipv4', 'ipv6']" :key="p">
|
||||||
|
<span>[[ p ]]</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
</a-setting-list-item>
|
||||||
<a-space direction="horizontal" :style="{ padding: '10px 20px' }">
|
<a-space direction="horizontal" :style="{ padding: '10px 20px' }">
|
||||||
<a-button v-if="noisesArray.length > 1" type="danger"
|
<a-button v-if="noisesArray.length > 1" type="danger"
|
||||||
@click="removeNoise(index)">Remove</a-button>
|
@click="removeNoise(index)">Remove</a-button>
|
||||||
|
|
Loading…
Reference in a new issue