mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-11 12:46:19 +00:00
add DNS Configuration to x-ui command
This commit is contained in:
parent
a9e85e2bb7
commit
0b07fb807e
1 changed files with 27 additions and 5 deletions
32
x-ui.sh
32
x-ui.sh
|
@ -1568,6 +1568,24 @@ SSH_port_forwarding() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dns_configuration() {
|
||||||
|
# Remove the /etc/resolv.conf file
|
||||||
|
rm -f /etc/resolv.conf
|
||||||
|
|
||||||
|
# Create a new /etc/resolv.conf file with the specified data
|
||||||
|
cat <<EOF > /etc/resolv.conf
|
||||||
|
nameserver 1.1.1.1
|
||||||
|
nameserver 1.0.0.1
|
||||||
|
nameserver 2606:4700:4700::1111
|
||||||
|
nameserver 2606:4700:4700::1001
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Make /etc/resolv.conf immutable
|
||||||
|
chattr +i /etc/resolv.conf
|
||||||
|
|
||||||
|
echo "DNS configuration updated and locked successfully."
|
||||||
|
}
|
||||||
|
|
||||||
show_usage() {
|
show_usage() {
|
||||||
echo "x-ui control menu usages: "
|
echo "x-ui control menu usages: "
|
||||||
echo "------------------------------------------"
|
echo "------------------------------------------"
|
||||||
|
@ -1620,10 +1638,11 @@ show_menu() {
|
||||||
${green}20.${plain} IP Limit Management
|
${green}20.${plain} IP Limit Management
|
||||||
${green}21.${plain} Firewall Management
|
${green}21.${plain} Firewall Management
|
||||||
${green}22.${plain} SSH Port Forwarding Management
|
${green}22.${plain} SSH Port Forwarding Management
|
||||||
|
${green}23.${plain} DNS Configuration
|
||||||
————————————————
|
————————————————
|
||||||
${green}23.${plain} Enable BBR
|
${green}24.${plain} Enable BBR
|
||||||
${green}24.${plain} Update Geo Files
|
${green}25.${plain} Update Geo Files
|
||||||
${green}25.${plain} Speedtest by Ookla
|
${green}26.${plain} Speedtest by Ookla
|
||||||
"
|
"
|
||||||
show_status
|
show_status
|
||||||
echo && read -p "Please enter your selection [0-25]: " num
|
echo && read -p "Please enter your selection [0-25]: " num
|
||||||
|
@ -1699,12 +1718,15 @@ show_menu() {
|
||||||
SSH_port_forwarding
|
SSH_port_forwarding
|
||||||
;;
|
;;
|
||||||
23)
|
23)
|
||||||
bbr_menu
|
dns_configuration
|
||||||
;;
|
;;
|
||||||
24)
|
24)
|
||||||
update_geo
|
bbr_menu
|
||||||
;;
|
;;
|
||||||
25)
|
25)
|
||||||
|
update_geo
|
||||||
|
;;
|
||||||
|
26)
|
||||||
run_speedtest
|
run_speedtest
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue