Commit Graph
30 Commits
  • new: vless reverse
    legacy reverse removed
  • ws/inbounds: realtime fixes + perf for 10k+ client inbounds (#4123)
    * ws/inbounds: realtime fixes + perf for 10k+ client inbounds
    
    - hub: dedup, throttle, panic-restart, deadlock fix, race tests
    - client: backoff cap + slow-retry instead of giving up
    - broadcast: delta-only payload, count-based invalidate fallback
    - filter: fix empty online list (Inbound has no .id, use dbInbound.toInbound)
    - perf: O(N²)→O(N) traffic merge, bulk delete, /setEnable endpoint
    - traffic: monotonic all_time + UI clamp + propagate in delta handler
    - session: persist on update/logout (fixes logout-after-password-change)
    - ui: protocol tags flex, traffic bar normalize
    
    * Remove hub_test.go file
    
    * fix: ws hub, inbound service, and frontend correctness
    
    - propagate DelInbound error on disable path in SetInboundEnable
    - skip empty emails in updateClientTraffics to avoid constraint violations
    - use consistent IN ? clause, drop redundant ErrRecordNotFound guards
    - Hub.Unregister: direct removeClient fallback when channel is full
    - applyClientStatsDelta: O(1) email lookup via per-inbound Map cache
    - WS payload size check: Blob.size instead of .length for real byte count
    
    * fix: chunk large IN ? queries and fix IPv6 same-origin check
    
    * fix: chunk large IN ? queries and fix IPv6 same-origin check
    
    * fix: unify clientStats cache, throttle clarity, hub constants
    
    * fix(ui): align traffic/expiry cell columns across all rows
    
    * style(ui): redesign outbounds table for visual consistency
    
    * style(ui): redesign routing table for visual consistency
    
    * fix:
    
    * fix:
    
    * fix:
    
    * fix:
    
    * fix:
    
    * fix: font
    
    * refactor: simplify outbound tone functions for consistency and maintainability
    
    ---------
    
    Co-authored-by: lolka1333 <test123@gmail.com>
  • subpage: enabled state
    Track and surface a subscription's enabled state from backend to frontend so the UI can show inactive subscriptions and use it in active-state logic.
    
    Changes:
    - sub/subService.go: track hasEnabledClient, set traffic.Enable, add Enabled to PageData and populate it in BuildPageData.
    - sub/subController.go: include enabled in the page context.
    - web/html/settings/panel/subscription/subpage.html: emit data-enabled attribute and render an "inactive" tag when disabled.
    - web/assets/js/subscription.js: read data-enabled and include it in isActive() checks.
    
    This ensures subscriptions with no enabled clients are marked inactive in the UI and excluded from being considered active.
  • feat: add configurable auto-restart on client auto-disable
    Add a configurable option to restart Xray when clients are auto-disabled and persist disable actions.
    
    Changes include:
    - New setting restartXrayOnClientDisable (default true), getters/setters in SettingService, UI toggle in general settings, and translations for multiple locales.
    - AddTraffic signature updated to return a third bool (clientsDisabled). disableInvalidClients now calls Xray API to remove users, marks client_traffics.enable=false, updates inbound.Settings JSON so clients appear disabled in stored settings, and returns appropriate counts/errors.
    - XrayTrafficJob now checks the clientsDisabled flag and restarts Xray when the setting is enabled (with fallback to mark Xray as needing restart on failure).
    - XrayService.GetXrayConfig call adjusted to ignore AddTraffic returns.
    - Subscription generation (subService/subJson/subClash) no longer filters clients by their enable flag when matching subId.
    - Minor fixes: check_client_ip_job now checks scanner.Err and improved API error handling/logging.
    
    These changes ensure auto-disabled clients are propagated to Xray and the stored inbound settings, and provide an option to restart Xray automatically after auto-disable events.
  • feat: Add NordVPN NordLynx (WireGuard) integration (#3827)
    * feat: Add NordVPN NordLynx (WireGuard) integration with dedicated UI and backend services.
    
    * remove limit=10 to get all servers
    
    * feat: add city selector to NordVPN modal
    
    * feat: auto-select best server on country/city change
    
    * feat: simplify filter logic and enforce > 7% load
    
    * fix
    
    ---------
    
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • feat add clash yaml convert (#3916)
    * docs(agents): add AI agent guidance documentation
    
    * feat(sub): add Clash/Mihomo YAML subscription service
    
    Add SubClashService to convert subscription links to Clash/Mihomo
    YAML format for direct client compatibility.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * feat(sub): integrate Clash YAML endpoint into subscription system
    
    - Add Clash route handler in SUBController
    - Update BuildURLs to include Clash URL
    - Pass Clash settings through subscription pipeline
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * feat(web): add Clash settings to entity and service
    
    - Add SubClashEnable, SubClashPath, SubClashURI fields
    - Add getter methods for Clash configuration
    - Set default Clash path to /clash/ and enable by default
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * feat(ui): add Clash settings to subscription panels
    
    - Add Clash enable switch in general subscription settings
    - Add Clash path/URI configuration in formats panel
    - Display Clash QR code on subscription page
    - Rename JSON tab to "Formats" for clarity
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * feat(js): add Clash support to frontend models
    
    - Add subClashEnable, subClashPath, subClashURI to AllSetting
    - Generate and display Clash QR code on subscription page
    - Handle Clash URL in subscription data binding
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    
    * fix
    
    ---------
    
    Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
    Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
  • Add url speed test for outbound (#3767)
    * add outbound testing functionality with configurable test URL
    
    * use no kernel tun for conflict errors
  • feat: more subscription information fields (#3701)
    * feat: more subscription information fields
    
    * fix: incorrect translation
    
    * feat: implement field for Happ custom routing rules
  • Enhance WebSocket client connection logic and improve event listener management (#3636)
    - Updated WebSocketClient to allow connection during CONNECTING state.
    - Introduced a flag for reconnection attempts.
    - Improved event listener registration to prevent duplicate callbacks.
    - Refactored online clients update logic in inbounds.html for better performance and clarity.
    - Added CSS styles for subscription link boxes in subpage.html to enhance UI consistency and interactivity.
    
    Co-authored-by: lolka1333 <test123@gmail.com>
  • feat: Real-time Outbound Traffic, UI Improvements & Fix (#3629)
    * Refactor HTML and JavaScript for improved UI and functionality
    
    - Cleaned up JavaScript methods in subscription.js for better readability.
    - Updated inbounds.html to clarify traffic update handling and removed unnecessary comments.
    - Enhanced xray.html by correcting casing in routingDomainStrategies.
    - Added mobile touch scrolling styles in page.html for better tab navigation on small screens.
    - Streamlined vless.html by removing redundant line breaks and improving form layout.
    - Refined subscription subpage.html for better structure and user experience.
    - Adjusted outbounds.html to improve button visibility and functionality.
    - Updated xray_traffic_job.go to ensure accurate traffic updates and real-time UI refresh.
    
    * Refactor client traffic handling in InboundService
    
    - Updated addClientTraffic method to initialize onlineClients as an empty slice instead of nil.
    - Improved clarity and consistency in handling empty onlineUsers scenario.
    
    * Add WebSocket support for outbounds traffic updates
    
    - Implemented WebSocket connection in xray.html to handle real-time updates for outbounds traffic.
    - Enhanced xray_traffic_job.go to retrieve and broadcast outbounds traffic updates.
    - Introduced MessageTypeOutbounds in hub.go for managing outbounds messages.
    - Added BroadcastOutbounds function in notifier.go to facilitate broadcasting outbounds updates to connected clients.
    
    ---------
    
    Co-authored-by: lolka1333 <test123@gmail.com>
  • feat: Add WebSocket support for real-time updates and enhance VLESS settings (#3605)
    * feat: add support for trusted X-Forwarded-For and testseed parameters in VLESS settings
    
    * chore: update Xray Core version to 25.12.8 in release workflow
    
    * chore: update Xray Core version to 25.12.8 in Docker initialization script
    
    * chore: bump version to 2.8.6 and add watcher for security changes in inbound modal
    
    * refactor: remove default and random seed buttons from outbound form
    
    * refactor: update VLESS form to rename 'Test Seed' to 'Vision Seed' and change button functionality for seed generation
    
    * refactor: enhance TLS settings form layout with improved button styling and spacing
    
    * feat: integrate WebSocket support for real-time updates on inbounds and Xray service status
    
    * chore: downgrade version to 2.8.5
    
    * refactor: translate comments to English
    
    * fix: ensure testseed is initialized correctly for VLESS protocol and improve client handling in inbound modal
    
    * refactor: simplify VLESS divider condition by removing unnecessary flow checks
    
    * fix: add fallback date formatting for cases when IntlUtil is not available
    
    * refactor: simplify WebSocket message handling by removing batching and ensuring individual message delivery
    
    * refactor: disable WebSocket notifications in inbound and index HTML files
    
    * refactor: enhance VLESS testseed initialization and button functionality in inbound modal
    
    * fix:
    
    * refactor: ensure proper WebSocket URL construction by normalizing basePath
    
    * fix:
    
    * fix:
    
    * fix:
    
    * refactor: update testseed methods for improved reactivity and binding in VLESS form
    
    * logger info to debug
    
    ---------
    
    Co-authored-by: lolka1333 <test123@gmail.com>
  • chore: use Intl for date formatting (#3588)
    * chore: use `Intl` for date formatting
    
    * fix: show last traffic reset
    
    * chore: use raw timestamps
    
    * fix: remove unnecessary import
  • feat: add ldap component (#3568)
    * add ldap component
    
    * fix: fix russian comments, tls cert verify default true
    
    * feat: remove replaces go mod for local dev
  • max port to 65535 (#3536)
    * add EXPOSE port in Dockerfile
    
    * fix: max port 65 531 -> 65 535
    
    * fix
    
    ---------
    
    Co-authored-by: mhsanaei <ho3ein.sanaei@gmail.com>
  • new: subJsonEnable
    after this subEnable by default is true
    and subJsonEnable is false
  • chore: add new dns features from v25.6.8
    * chore: add new dns params
    
    * chore: add `DNS Presets` modal
    
    * chore: edit file names
  • chore: implement 2fa auth (#2968)
    * chore: implement 2fa auth
    
    from #2786
    
    * chore: format code
    
    * chore: replace two factor token input with qr-code
    
    * chore: requesting confirmation of setting/removing two-factor authentication
    
    otpauth library was taken from cdnjs
    
    * chore: revert changes in `ClipboardManager`
    
    don't need it.
    
    * chore: removing twoFactor prop in settings page
    
    * chore: remove `twoFactorQr` object in `mounted` function
  • Code refactoring (#2865)
    * refactor: use vue inline styles in entire application
    
    * refactor: setting row in dashboard page
    
    * refactor: use blob for download file in text modal
    
    * refactor: move all html templates in `web/html` folder
    
    * refactor: `DeviceUtils` -> `MediaQueryMixin`
    The transition to mixins has been made, as they can update themselves.
    
    * chore: pretty right buttons in `outbounds` tab in xray settings
    
    * refactor: add translations for system status
    
    * refactor: adjust gutter spacing in setting list item
    
    * refactor: use native `a-input-password` for password field
    
    * chore: return old system status
    with new translations
    
    * chore: add missing translation