mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-03 14:43:01 +00:00
Compare commits
No commits in common. "23c1d21f8dc2d84c96b1a96f4563f65d0271c9a6" and "88fdb2142492c9f8915989c54fc9b388bc7e117d" have entirely different histories.
23c1d21f8d
...
88fdb21424
6 changed files with 5 additions and 9 deletions
|
|
@ -29,8 +29,7 @@ RUN apk add --no-cache --update \
|
|||
ca-certificates \
|
||||
tzdata \
|
||||
fail2ban \
|
||||
bash \
|
||||
curl
|
||||
bash
|
||||
|
||||
COPY --from=builder /app/build/ /app/
|
||||
COPY --from=builder /app/DockerEntrypoint.sh /app/
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ is_ip() {
|
|||
is_ipv4 "$1" || is_ipv6 "$1"
|
||||
}
|
||||
is_domain() {
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*)\.([A-Za-z]{2,})$ ]] && return 0 || return 1
|
||||
}
|
||||
|
||||
# Port helpers
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ is_ip() {
|
|||
is_ipv4 "$1" || is_ipv6 "$1"
|
||||
}
|
||||
is_domain() {
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+[A-Za-z]{2,}$ ]] && return 0 || return 1
|
||||
}
|
||||
|
||||
# Port helpers
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ func (s *XrayService) GetXrayErr() error {
|
|||
}
|
||||
|
||||
err := p.GetErr()
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" && err.Error() == "exit status 1" {
|
||||
// exit status 1 on Windows means that Xray process was killed
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ After=network.target
|
|||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/conf.d/x-ui
|
||||
EnvironmentFile=-/etc/x-ui/x-ui.env
|
||||
Environment="XRAY_VMESS_AEAD_FORCED=false"
|
||||
Type=simple
|
||||
WorkingDirectory=/usr/lib/x-ui/
|
||||
|
|
|
|||
2
x-ui.sh
2
x-ui.sh
|
|
@ -47,7 +47,7 @@ is_ip() {
|
|||
is_ipv4 "$1" || is_ipv6 "$1"
|
||||
}
|
||||
is_domain() {
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
|
||||
[[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+[A-Za-z]{2,}$ ]] && return 0 || return 1
|
||||
}
|
||||
|
||||
# check root
|
||||
|
|
|
|||
Loading…
Reference in a new issue