### Run ShellCrash Docker Image (Quick Start) Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Starts a ShellCrash container with HTTP/SOCKS proxy and management ports exposed. Use for basic proxy needs. ```shell docker run -d \ --name shellcrash \ -p 7890:7890 \ -p 9999:9999 \ juewuy/shellcrash:latest ``` -------------------------------- ### Install ShellCrash via curl (Private Mirror) Source: https://context7.com/juewuy/shellcrash/llms.txt Installs ShellCrash using curl from the author's private mirror. Ensures the profile is sourced. ```sh # Install via curl (author's private mirror) export url='https://gh.jwsc.eu.org/dev' \ && bash -c "$(curl -kfsSl $url/install_en.sh)" \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Router Devices via curl (Author's Private Source) Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on router devices using curl from the author's private source. This is an alternative installation method. Requires root privileges and SSH access. ```bash export url='https://gh.jwsc.eu.org/dev' && sh -c "$(curl -kfsSl $url/install_en.sh)" && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash via wget Source: https://context7.com/juewuy/shellcrash/llms.txt Installs ShellCrash using wget from a jsDelivr CDN. Ensures the profile is sourced after installation. ```sh # Install via wget (jsDelivr CDN) export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && bash /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Router Devices via wget (GitHub Source) Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on router devices using wget from the GitHub source. Recommended for overseas or proxied environments. The script is downloaded to /tmp/install.sh and then executed. ```bash export url='https://raw.githubusercontent.com/juewuy/ShellCrash/dev' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && sh /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Standard Linux via wget Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash using wget from the jsDelivr CDN. Ensure root privileges and SSH access. The script will be downloaded to /tmp/install.sh and then executed. ```bash export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@dev' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && bash /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash via curl (GitHub) Source: https://context7.com/juewuy/shellcrash/llms.txt Installs ShellCrash using curl from the GitHub source. Recommended when proxy access is available. Ensures the profile is sourced. ```sh # Install via curl (GitHub source — recommended with proxy access) export url='https://raw.githubusercontent.com/juewuy/ShellCrash/dev' \ && sh -c "$(curl -kfsSl $url/install_en.sh)" \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Standard Linux via curl Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash using curl from the author's private source. This method requires root privileges and SSH access. The installation script is executed directly. ```bash export url='https://gh.jwsc.eu.org/dev' && bash -c "$(curl -kfsSl $url/install_en.sh)" && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Router Devices via wget (jsDelivr CDN) Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on router devices using wget from the jsDelivr CDN. This method is suitable for environments with potential access issues to GitHub. The script is downloaded to /tmp/install.sh and then executed. ```bash export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@dev' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && sh /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash Stable Channel Source: https://context7.com/juewuy/shellcrash/llms.txt Installs the stable version of ShellCrash by explicitly setting the URL before running the installer. Ensures the profile is sourced. ```sh # To install the stable channel explicitly, set the url before running: export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@stable' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && bash /tmp/install.sh ``` -------------------------------- ### Install ShellCrash on Legacy Devices via wget Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on legacy devices with older wget versions using the author's private HTTP beta source. The script is downloaded to /tmp/install.sh and then executed. ```bash export url='http://t.jwsc.eu.org' \ && wget -q -O /tmp/install.sh $url/install_en.sh \ && sh /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash on Router Devices via curl (GitHub Source) Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on router devices using curl from the GitHub source. Recommended for overseas or proxied environments. Requires root privileges and SSH access. ```bash export url='https://raw.githubusercontent.com/juewuy/ShellCrash/dev' \ && sh -c "$(curl -kfsSl $url/install_en.sh)" \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Install ShellCrash Dependencies on Alpine Linux Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs necessary packages like wget and openrc on Alpine Linux before executing the ShellCrash installation script. Ensure you have sufficient permissions. ```shell # Install necessary dependencies apk add --no-cache wget openrc ca-certificates tzdata nftables iproute2 dcron # Execute installation command export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@dev' \ && wget -q --no-check-certificate -O /tmp/install.sh $url/install_en.sh \ && sh /tmp/install.sh \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Set Web Dashboard Type and Port Source: https://context7.com/juewuy/shellcrash/llms.txt Configures the type of web UI (dashboard) to install and the port it will listen on. 'zashboard' is the recommended default. The installer automatically patches the JS bundle to use the correct host and port. ```shell setconfig db_type zashboard setconfig db_port 9999 ``` -------------------------------- ### Install ShellCrash on Router Devices via curl (jsDelivr CDN) Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Installs ShellCrash on router devices using curl from the jsDelivr CDN. This method is suitable for environments with potential access issues to GitHub. Requires root privileges and SSH access. ```bash export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@dev' \ && sh -c "$(curl -kfsSl $url/install_en.sh)" \ && . /etc/profile &> /dev/null ``` -------------------------------- ### Launch ShellCrash Interactive Menu Source: https://context7.com/juewuy/shellcrash/llms.txt Launches the interactive management dashboard for ShellCrash using the installed alias. ```sh crash # Launch the interactive menu ``` ```sh crash -h # Show command help / usage list ``` -------------------------------- ### ShellCrash Service Lifecycle Management Source: https://context7.com/juewuy/shellcrash/llms.txt Control the starting, stopping, and restarting of the ShellCrash service and its associated firewall rules using the start.sh script. ```sh # Start the proxy service (applies firewall rules, launches CrashCore): "$CRASHDIR/start.sh" start # Stop the service (clears firewall rules, kills CrashCore): "$CRASHDIR/start.sh" stop # Restart: "$CRASHDIR/start.sh" restart # Initialize environment only (used on boot by init scripts): "$CRASHDIR/start.sh" init # CrashCore is launched as: # For mihomo/clash: CrashCore -d $BINDIR -f $TMPDIR/config.yaml # For sing-box: CrashCore run -D $BINDIR -C $TMPDIR/jsons ``` -------------------------------- ### Run Services with Docker Compose Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Starts the ShellCrash services defined in the `compose.yml` file in detached mode. Ensure the `compose.yml` is correctly configured for your environment. ```shell docker compose up -d ``` -------------------------------- ### Docker Commands for ShellCrash Source: https://context7.com/juewuy/shellcrash/llms.txt Commands to pull and start the ShellCrash Docker container, and to access its interactive menu. ```sh # Pull and start: docker compose -f docker/compose.yml up -d # The container auto-launches ShellCrash in container mode: # crashcore=meta, dns_mod=mix, firewall_area=1, firewall_mod=nftables # Access the menu via: docker exec -it shellcrash crash ``` -------------------------------- ### Access ShellCrash Container Shell Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Executes a shell inside the running ShellCrash container for initial setup, configuration import, and service management. Essential after first deployment. ```shell docker exec -it shellcrash sh -l ``` -------------------------------- ### Download and Verify Core Binary Source: https://context7.com/juewuy/shellcrash/llms.txt Initiates the download and verification process for the selected proxy core binary. This script relies on helper libraries for core tools and target checking. ```shell . "$CRASHDIR/libs/core_tools.sh" . "$CRASHDIR/libs/check_target.sh" core_webget ``` -------------------------------- ### Create Host Directory for Compose Deployment Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Creates a directory on the host and navigates into it, preparing for Docker Compose deployment of ShellCrash. ```shell mkdir -p /tmp/ShellCrash cd /tmp/ShellCrash ``` -------------------------------- ### Proxy Core Management with core_tools Source: https://context7.com/juewuy/shellcrash/llms.txt Functions for extracting, verifying, downloading, and switching between mihomo and sing-box proxy cores. Supports various archive formats and verifies binary integrity. ```shell . "$CRASHDIR/libs/core_tools.sh" # core_unzip $1:archive_path $2:output_name # Supports .tar.gz, .gz, .upx formats core_unzip /tmp/mihomo.tar.gz CrashCore # core_check $1:downloaded_archive # Verifies the binary matches the expected core type (clash vs singbox), # extracts version string, compresses to .gz, updates config core_check /tmp/Coretmp.tar.gz # Returns: 0=ok, 1=download error, 2=verification failed # core_find — Locate and extract an existing core binary from CRASHDIR core_find # core_webget — Download the correct core binary for the current CPU architecture # Uses $crashcore (meta|singboxr|singbox|clash) and $cpucore (arm64|armv7|amd64...) crashcore=meta cpucore=arm64 core_webget # On success: sets $core_v, updates command.env, updates ShellCrash.cfg ``` -------------------------------- ### Configure DNS Server Groups Source: https://context7.com/juewuy/shellcrash/llms.txt Sets the primary DNS nameservers, fallback servers for proxying, and bootstrap resolvers. Use '|' as a separator in the menu; it's stored as ', '. ```shell setconfig dns_nameserver "'223.5.5.5, 1.2.4.8'" setconfig dns_fallback "'1.1.1.1, 8.8.8.8'" setconfig dns_resolver "'223.5.5.5, 2400:3200::1'" setconfig dns_proxy_server "'223.5.5.5, 2400:3200::1'" ``` -------------------------------- ### Create Host Directory for Persistent Configuration Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Creates a directory on the host machine to store ShellCrash configurations persistently. This is an optional step for data persistence. ```shell mkdir -p /root/ShellCrash ``` -------------------------------- ### Set Core Type and CPU Architecture Source: https://context7.com/juewuy/shellcrash/llms.txt Programmatically sets the proxy core type (e.g., meta, singbox) and the target CPU architecture (e.g., arm64, amd64) to trigger a download. ```shell . "$CRASHDIR/libs/set_config.sh" setconfig crashcore meta setconfig cpucore arm64 ``` -------------------------------- ### Run ShellCrash Docker Image (Transparent Proxy) Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Launches ShellCrash in transparent proxy mode using a macvlan network. Requires elevated privileges and specific device mappings. Ensure your host supports TUN devices. ```shell docker run -d \ --name shellcrash \ --network macvlan_lan \ --ip 192.168.31.222 \ --cap-add NET_ADMIN \ --cap-add NET_RAW \ --cap-add SYS_ADMIN \ --sysctl net.ipv4.ip_forward=1 \ --device /dev/net/tun:/dev/net/tun \ --restart unless-stopped \ juewuy/shellcrash:latest ``` -------------------------------- ### Set Compression Type for Core Download Source: https://context7.com/juewuy/shellcrash/llms.txt Specifies the compression format for downloaded core binaries. Options include 'tar.gz' (standard), 'gz' (single gzip), and 'upx' (UPX-compressed for smaller size). ```shell setconfig zip_type gz ``` -------------------------------- ### Download Docker Compose Template Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Downloads the `compose.yml` template file for deploying ShellCrash using Docker Compose. This file will be used to configure and run the services. ```shell curl -sSL https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@dev/docker/compose.yml -O ``` -------------------------------- ### Configure DNS Routing Mode Source: https://context7.com/juewuy/shellcrash/llms.txt Sets the DNS routing mode. 'mix' is a hybrid mode for mihomo/sing-box, 'route' is for rule-based routing (mihomo/sing-box only), and 'redir_host' is a basic mode compatible with all cores. ```shell setconfig dns_mod mix ``` -------------------------------- ### Enable Persistent Configuration with Volume Mount Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Integrates a volume mount into the `docker run` command to persist ShellCrash configurations. Replace `shellcrash_configs` with your desired volume name. ```shell docker run -d \ ……………… \ -v shellcrash_configs:/etc/ShellCrash/configs \ ……………… ``` -------------------------------- ### Load ShellCrash Configuration Defaults Source: https://context7.com/juewuy/shellcrash/llms.txt Sources ShellCrash configuration files and populates default values for unset variables related to ports, DNS, and routing. ```sh . "$CRASHDIR/libs/get_config.sh" # After sourcing, the following variables are available with their defaults: echo $mix_port # 7890 (HTTP/SOCKS mixed proxy port) echo $redir_port # 7892 (transparent redirect port) echo $tproxy_port # 7893 (TProxy port) echo $db_port # 9999 (dashboard/web UI port) echo $dns_port # 1053 (internal DNS port) echo $fwmark # same as redir_port by default echo $table # 100 (routing table number) echo $dns_nameserver # '223.5.5.5, 1.2.4.8' (direct DNS) echo $dns_fallback # '1.1.1.1, 8.8.8.8' (proxy DNS) echo $dns_resolver # '223.5.5.5, 2400:3200::1' (resolver DNS) ``` -------------------------------- ### Cron Task Management with cronadd, cronload, cronset Source: https://context7.com/juewuy/shellcrash/llms.txt Cross-platform utilities for managing cron tasks, compatible with standard crontab and firmware-specific cron directories. Allows loading, adding, and removing cron jobs. ```shell . "$CRASHDIR/libs/set_cron.sh" # Load current crontab cronload # cronset $1:keyword_to_remove $2:new_cron_line # Removes all existing cron lines containing $1, then appends $2 # Schedule config auto-update every day at 3:00 AM cronset "ShellCrash_update" "0 3 * * * $CRASHDIR/task/task.sh update_config" # Remove a scheduled task entirely (omit $2) cronset "ShellCrash_update" # Add a cron file directly echo "30 2 * * * $CRASHDIR/task/task.sh update_geo" > /tmp/my_cron cronadd /tmp/my_cron ``` -------------------------------- ### Create macvlan Network for Transparent Proxy Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Creates a macvlan network required for transparent proxying (e.g., on routers). Adjust subnet, gateway, and parent interface to match your network environment. ```shell docker network create \ --driver macvlan \ --subnet 192.168.31.0/24 \ --gateway 192.168.31.1 \ -o parent=eth0 \ macvlan_lan ``` -------------------------------- ### Enable Full DoH Encryption Source: https://context7.com/juewuy/shellcrash/llms.txt Configures DNS over HTTPS (DoH) for nameservers and fallback servers. This is equivalent to selecting menu option 9 > 2 > 5 and is supported by mihomo/sing-box. ```shell setconfig dns_nameserver "'https://dns.alidns.com/dns-query, https://doh.pub/dns-query'" setconfig dns_fallback "'https://cloudflare-dns.com/dns-query, https://dns.google/dns-query'" setconfig dns_resolver "'https://223.5.5.5/dns-query, 2400:3200::1'" ``` -------------------------------- ### Set Firewall Mode to nftables Source: https://context7.com/juewuy/shellcrash/llms.txt Configures the firewall backend to use nftables, which is preferred on modern systems. ```shell setconfig firewall_mod nftables ``` -------------------------------- ### Resilient File Downloader with webget Source: https://context7.com/juewuy/shellcrash/llms.txt Downloads files using wget or curl with automatic proxy detection, CDN/mirror fallback, and progress display. Supports options for silent downloads, redirect following, and certificate verification. ```shell . "$CRASHDIR/libs/web_get.sh" # Parameters: $1=destination path, $2=URL, $3=display mode, $4=redirect mode, # $5=cert mode, $6=user-agent # Download silently webget /tmp/myfile.tar.gz "https://example.com/file.tar.gz" echooff # Download with progress bar webget /tmp/myfile.tar.gz "https://example.com/file.tar.gz" echoon # Disable redirect following webget /tmp/file.txt "https://example.com/redirect" echooff rediroff # Skip TLS certificate verification webget /tmp/file.txt "https://example.com/file" echooff "" skipceroff # Return code 0 = success, non-zero = failure if webget /tmp/version "$update_url/version" echooff; then version=$(cat /tmp/version) fi ``` -------------------------------- ### Launch ShellCrash Management Interface Source: https://github.com/juewuy/shellcrash/blob/dev/README.md Use the 'crash' command to launch the interactive script menu for ShellCrash. For command help, use 'crash -h'. ```shell crash # Launch the interactive script menu ``` ```shell crash -h # View the list of command help ``` -------------------------------- ### Structured Logging with Push Notifications using logger Source: https://context7.com/juewuy/shellcrash/llms.txt Appends timestamped log entries to a file and optionally pushes notifications to various services. Supports ANSI color codes and duplicate line removal. ```shell . "$CRASHDIR/libs/logger.sh" # logger "$message" "$color_code" "$push_flag" "$dedup_flag" # $2: ANSI color code (e.g. 32=green, 31=red), or 0 for no color # $3: "off" to suppress push notification, omit to send if configured # $4: "on" to remove duplicate lines before appending logger "Service started successfully" 32 # green, push if configured logger "Download failed" 31 off # red, no push logger "Updating config..." 33 "" on # yellow, deduplicate # Push configuration keys in ShellCrash.cfg: # push_TG= chat_ID= (Telegram) # push_bark= (Bark) # push_Deer= push_Deer_url= (PushDeer) # push_Po= push_Po_key=(Pushover) # push_PP= (PushPlus) # push_Gotify= (Gotify) # push_SynoChat= push_ChatTOKEN= push_ChatUSERID= ``` -------------------------------- ### Set ShellCrash Configuration Values Source: https://context7.com/juewuy/shellcrash/llms.txt Uses the setconfig function to write key-value pairs to the ShellCrash configuration file. Removes existing lines for the key before appending. ```sh # Source the library . "$CRASHDIR/libs/set_config.sh" # Write to default config ($CRASHDIR/configs/ShellCrash.cfg) setconfig dns_mod mix # set DNS mode to "mix" setconfig mix_port 7890 # set mixed-proxy port setconfig crashcore meta # select mihomo (meta) as the proxy core # Write to a custom config file (3rd argument) setconfig COMMAND '"$TMPDIR/CrashCore -d $BINDIR -f $TMPDIR/config.yaml"' \ "$CRASHDIR/configs/command.env" # Clear/delete a key (omit value): setconfig dns_redir_port # removes dns_redir_port line from config ``` -------------------------------- ### Manually Trigger Geo-Data Update Source: https://context7.com/juewuy/shellcrash/llms.txt Initiates the update process for geographic IP and domain rule databases using the task system. These databases are crucial for proxy core functionality. ```shell "$CRASHDIR/task/task.sh" update_geo ``` -------------------------------- ### ShellCrash Configuration Variables Source: https://context7.com/juewuy/shellcrash/llms.txt Key configuration variables for ShellCrash, stored in a plain text file. These settings control the proxy core, network mode, firewall, DNS, and update channels. ```sh # Example ShellCrash.cfg: crashcore=meta # Proxy core: meta|singboxr|singbox|clash cpucore=arm64 # CPU arch: arm64|armv7|armv5|amd64|... redir_mod=Tproxy # Traffic mode: Redir|Tproxy|Tun|Mix firewall_area=2 # Scope: 1=LAN|2=LAN+self|3=self|4=pure|5=custom firewall_mod=nftables # Backend: iptables|nftables dns_mod=mix # DNS mode: mix|route|redir_host mix_port=7890 # HTTP/SOCKS5 mixed proxy port redir_port=7892 # Transparent redirect port tproxy_port=7893 # TProxy port db_port=9999 # Dashboard web UI port dns_port=1053 # Internal DNS listen port dns_nameserver='223.5.5.5, 1.2.4.8' dns_fallback='1.1.1.1, 8.8.8.8' dns_resolver='223.5.5.5, 2400:3200::1' release_type=master # Update channel: stable|master|dev| update_url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' my_alias=crash # Shell alias for the management command versionsh_l=1.9.5alpha14 # Installed script version core_v=v1.19.17 # Installed core version db_type=zashboard # Dashboard type skip_cert=ON # Skip TLS certificate verification for downloads sniffer=OFF # Enable protocol sniffer (ON for sing-box) ipv6_redir=OFF # Enable IPv6 transparent proxy push_TG= # Telegram bot token for log push ``` -------------------------------- ### Docker Compose for ShellCrash Gateway Source: https://context7.com/juewuy/shellcrash/llms.txt Deploy ShellCrash as a Docker container with a macvlan network to act as a transparent gateway for your LAN. This configuration requires specific network and capability settings for the container. ```yaml version: "3.9" services: shellclash: image: juewuy/shellcrash:latest container_name: shellcrash networks: macvlan_lan: ipv4_address: 192.168.31.222 # Static IP on LAN for gateway mode cap_add: - SYS_ADMIN - NET_ADMIN - NET_RAW devices: - "/dev/net/tun:/dev/net/tun" # Required for TUN mode sysctls: - net.ipv4.ip_forward: 1 # Enable IP forwarding volumes: - shellcrash_configs:/etc/ShellCrash/configs:rw # Persist configuration restart: unless-stopped volumes: shellcrash_configs: networks: macvlan_lan: name: macvlan_lan driver: macvlan driver_opts: parent: eth0 # Host network interface ipam: config: - subnet: 192.168.31.0/24 gateway: 192.168.31.1 ``` -------------------------------- ### Configure Other DNS Toggles Source: https://context7.com/juewuy/shellcrash/llms.txt Enables or configures various DNS-related features, including preventing DNS leaks, enabling /etc/hosts injection, EDNS Client Subnet, and overriding the DNS redirect port. ```shell setconfig dns_protect ON setconfig hosts_opt ON setconfig ecs_subnet ON setconfig dns_redir_port 1053 ``` -------------------------------- ### Clean All Geo-Data Files Source: https://context7.com/juewuy/shellcrash/llms.txt Removes all downloaded geo-data files, including IP lists, databases, and ruleset bundles, from the configuration directory. This forces a fresh download on the next update. ```shell for file in cn_ip.txt cn_ipv6.txt Country.mmdb GeoSite.dat geoip.db geosite.db; do rm -rf "$CRASHDIR/$file" done rm -rf "$CRASHDIR/ruleset/*" ``` -------------------------------- ### Set Proxy Mode Configuration Source: https://context7.com/juewuy/shellcrash/llms.txt Configures the traffic interception method for firewall rules. Available modes include Redir, Tproxy, Tun, Mix, and Pure. Also controls the scope of firewall rules. ```shell # Available redir_mod values: # Redir — iptables REDIRECT (TCP only, most compatible) # Tproxy — iptables TPROXY (TCP+UDP) # Tun — TUN virtual interface (requires tun kernel module) # Mix — Tproxy + Tun hybrid mode # (empty) — Pure/clean mode (no firewall rules, manual proxy config) # Set transparent proxy mode programmatically: . "$CRASHDIR/libs/set_config.sh" setconfig redir_mod Tproxy # firewall_area controls scope: # 1 = LAN only # 2 = LAN + this device # 3 = this device only # 4 = pure mode (proxy port only, no transparent redirect) # 5 = custom (run start.sh only, skip firewall setup) setconfig firewall_area 2 ``` -------------------------------- ### Add Domains to FakeIP Filter Source: https://context7.com/juewuy/shellcrash/llms.txt Appends domains to the fake_ip_filter file, excluding them from fake-IP assignment. This is useful for specific local or internal domains. ```shell echo "*.lan" >> "$CRASHDIR/configs/fake_ip_filter" echo "localhost.ptlogin2.qq.com" >> "$CRASHDIR/configs/fake_ip_filter" ``` -------------------------------- ### Remove Containers and Volumes with Docker Compose Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Stops and removes all containers, networks, and volumes defined in the Docker Compose project. Use `-v` to also remove associated volumes. ```shell docker-compose down -v ``` -------------------------------- ### Remove ShellCrash Docker Volume Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Removes the Docker volume used for persisting ShellCrash configurations. This action will delete all stored configurations. ```shell docker volume rm shellcrash_configs ``` -------------------------------- ### Remove ShellCrash Docker Container Source: https://github.com/juewuy/shellcrash/blob/dev/docker/README.md Forcefully removes a running or stopped ShellCrash container. Use this command to clean up the container instance. ```shell docker rm -f shellcrash ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.