Repository Analysis

MHSanaei/3x-ui

Xray panel supporting multi-protocol multi-user expire day & traffic & IP limit (Vmess, Vless, Trojan, ShadowSocks, Wireguard, Hysteria, Tunnel, Mixed, HTTP, Tun)

0.8 Likely human-written View on GitHub
0.8
Adjusted Score
0.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
38,754
Stars
TypeScript
Language
124,752
Lines of Code
456
Files
69
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 5LOW 64

Pattern Findings

69 matches across 8 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers35 hits · 44 pts
SeverityFileLineSnippet
LOWfrontend/vite.config.js98function esToolkitCompatEsmResolver() {
LOWfrontend/src/components/FinalMaskForm.tsx72function defaultUdpClientServerItem(): Record<string, unknown> {
LOWfrontend/src/hooks/useTheme.tsx103export function pauseAnimationsUntilLeave(elementId: string): void {
LOWfrontend/src/lib/xray/outbound-defaults.ts26export function createDefaultFreedomOutboundSettings(): FreedomOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts30export function createDefaultBlackholeOutboundSettings(): BlackholeOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts34export function createDefaultLoopbackOutboundSettings(): LoopbackOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts38export function createDefaultDNSOutboundSettings(): DNSOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts48export function createDefaultVmessOutboundSettings(): VmessOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts58export function createDefaultVlessOutboundSettings(): VlessOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts68export function createDefaultTrojanOutboundSettings(): TrojanOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts79export function createDefaultShadowsocksOutboundSettings(): ShadowsocksOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts90export function createDefaultSocksOutboundSettings(): SocksOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts96export function createDefaultHttpOutboundSettings(): HttpOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts106export function createDefaultWireguardOutboundSettings(
LOWfrontend/src/lib/xray/outbound-defaults.ts124export function createDefaultHysteriaOutboundSettings(): HysteriaOutboundSettings {
LOWfrontend/src/lib/xray/outbound-defaults.ts150export function createDefaultOutboundSettings(protocol: string): AnyOutboundSettings | null {
LOWfrontend/src/lib/xray/outbound-link-parser.ts42function applyXhttpStringFromParams(xhttp: Raw, params: URLSearchParams): void {
LOWfrontend/src/lib/xray/inbound-defaults.ts91export function createDefaultTrojanClient(seed: TrojanClientSeed = {}): TrojanClient {
LOWfrontend/src/lib/xray/inbound-defaults.ts108export function createDefaultShadowsocksClient(seed: ShadowsocksClientSeed = {}): ShadowsocksClient {
LOWfrontend/src/lib/xray/inbound-defaults.ts122export function createDefaultHysteriaClient(seed: HysteriaClientSeed = {}): HysteriaClient {
LOWfrontend/src/lib/xray/inbound-defaults.ts134export function createDefaultVlessInboundSettings(): VlessInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts143export function createDefaultVmessInboundSettings(): VmessInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts147export function createDefaultTrojanInboundSettings(): TrojanInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts158export function createDefaultShadowsocksInboundSettings(
LOWfrontend/src/lib/xray/inbound-defaults.ts178export function createDefaultHysteriaInboundSettings(
LOWfrontend/src/lib/xray/inbound-defaults.ts187export function createDefaultHttpInboundSettings(): HttpInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts194export function createDefaultMixedInboundSettings(): MixedInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts203export function createDefaultTunnelInboundSettings(): TunnelInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts211export function createDefaultTunInboundSettings(): TunInboundSettings {
LOWfrontend/src/lib/xray/inbound-defaults.ts230export function createDefaultWireguardInboundSettings(
LOWfrontend/src/lib/xray/inbound-defaults.ts266export function createDefaultInboundSettings(protocol: string): AnyInboundSettings | null {
LOWfrontend/src/lib/xray/inbound-from-db.ts23function fillProtocolSettingsDefaults(protocol: string, settings: Record<string, unknown>): Record<string, unknown> {
LOWfrontend/src/lib/xray/inbound-form-adapter.ts239export function dropLegacyOptionalEmpties(
LOWfrontend/src/lib/xray/inbound-link.ts94function hasShareableFinalMaskValue(value: unknown): boolean {
LOWfrontend/src/lib/xray/inbound-link.ts262function applyExternalProxyTLSParams(
Redundant / Tautological Comments12 hits · 20 pts
SeverityFileLineSnippet
LOWx-ui.sh848 # Check if the firewall is inactive
LOWx-ui.sh869 # Check if the input is valid
LOWx-ui.sh897 # Check if the port range has been successfully opened
LOWx-ui.sh900 # Check if the individual port has been successfully opened
LOWx-ui.sh968 # Check if the port range has been deleted
LOWx-ui.sh971 # Check if the individual port has been deleted
LOWx-ui.sh1052 # Check if acme.sh is already installed
LOWx-ui.sh1743 # Check if Speedtest is already installed
LOWx-ui.sh1961 # Check if log file exists
LOWx-ui.sh1966 # Check if service log file exists so fail2ban won't return error
LOWinstall.sh242 # Check if acme.sh is installed
LOWupdate.sh185 # Check if acme.sh is installed
Over-Commented Block13 hits · 13 pts
SeverityFileLineSnippet
LOWfrontend/src/schemas/forms/inbound-form.ts1import { z } from 'zod';
LOWfrontend/src/schemas/forms/outbound-form.ts21// - vmess vnext / trojan-ss-socks-http servers are FLATTENED into
LOWfrontend/src/schemas/api/inbound.ts1import { z } from 'zod';
LOWfrontend/src/components/HeaderMapEditor.tsx1import { useEffect, useRef, useState } from 'react';
LOWfrontend/src/lib/xray/outbound-link-parser.ts1import { Base64 } from '@/utils';
LOWweb/job/check_client_ip_job.go41//
LOWweb/service/outbound.go141
LOWweb/service/xray_setting.go41}
LOWweb/service/xray_setting.go81 // JSON-encoded string of an object. Handle both.
LOWweb/service/xray_setting.go101// client appears offline with zero traffic even though the actual proxy
LOWsub/subService.go1081
LOWsub/subService.go1281 return nil, false
LOWsub/subService.go1401}
Verbosity Indicators4 hits · 8 pts
SeverityFileLineSnippet
LOWweb/service/inbound.go3185 // Step 1: Get ClientTraffic records for emails in the input list.
LOWweb/service/inbound.go3197 // Step 2: Sort clients by (Up + Down) descending
LOWweb/service/inbound.go3202 // Step 3: Extract sorted valid emails and track found ones
LOWweb/service/inbound.go3210 // Step 4: Identify emails that were not found in the database
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/release.yml179 # =================================
MEDIUM.github/workflows/release.yml181 # =================================
Self-Referential Comments1 hit · 4 pts
SeverityFileLineSnippet
MEDIUMx-ui.sh1971 # Create the iplimit jail files
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMweb/service/tgbot.go364 // Create robust fasthttp client
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
MEDIUMx-ui.sh1059 cd ~ || return 1 # Ensure you can change to the home directory