# ruleset.conf 远程规则集,仅定义变量,不执行代码 DOMAINS=( "access1.tpns.sh.tencent.com" "android.crashsight.qq.com" "api.xunyou.mobi" "cdn.wetest.qq.com" "cfg.imtt.qq.com" "cgi.connect.qq.com" "cloudctrl.gcloud.qq.com" "csy.ll.tcdnos.com" "csy.pandora.tcdnos.com" "dldir1.qq.com" "down.pandora.qq.com" "game.gtimg.cn" "gpcloud.tgpa.qq.com" "h.trace.qq.com" "hpjy-op.tga.qq.com" "hpjy-report.tga.qq.com" "hpjytv-pic.tga.qq.com" "htrace.wetvinfo.com" "hwydown.ll.tcdnos.com" "hwypandora.ll.tcdnos.com" "idcconfig.gcloudsdk.com" "img.msdk.qq.com" "log.tbs.qq.com" "log.tpns.sh.tencent.com" "luyou360.cn" "mazu.m.qq.com" "otheve.beacon.qq.com" "portal.xunyou.mobi" "qos.189.cn" "qos.game.qq.com" "qos.game.qq.com:8080" "snowflake.qq.com" "tbsrecovery.imtt.qq.com" "tbstx.csy.tcdnos.com" "tdid.m.qq.com" "thirdwx.qlogo.cn" ) TENCENT_CLOUD=( "access1.tpns.sh.tencent.com" "log.tpns.sh.tencent.com" "cloudctrl.gcloud.qq.com" "idcconfig.gcloudsdk.com" ) GAME_SERVICES=( "game.gtimg.cn" "dldir1.qq.com" "down.pandora.qq.com" "gpcloud.tgpa.qq.com" "qos.game.qq.com" "qos.game.qq.com:8080" ) ANALYTICS=( "android.crashsight.qq.com" "h.trace.qq.com" "htrace.wetvinfo.com" "log.tbs.qq.com" "otheve.beacon.qq.com" "snowflake.qq.com" ) CDN_SERVICES=( "cdn.wetest.qq.com" "csy.ll.tcdnos.com" "csy.pandora.tcdnos.com" "hwypandora.ll.tcdnos.com" "hwydown.ll.tcdnos.com" "tbstx.csy.tcdnos.com" ) AUTH_SERVICES=( "cgi.connect.qq.com" "img.msdk.qq.com" "mazu.m.qq.com" "tdid.m.qq.com" "thirdwx.qlogo.cn" ) CONFIG_SERVICES=( "cfg.imtt.qq.com" "tbsrecovery.imtt.qq.com" ) ACCELERATION=( "api.xunyou.mobi" "portal.xunyou.mobi" "luyou360.cn" "qos.189.cn" ) REPORT_SERVICES=( "hpjy-op.tga.qq.com" "hpjy-report.tga.qq.com" "hpjytv-pic.tga.qq.com" ) SECURITY_DETECTION=( "punish.qq.com" "secure.qq.com" "security.qq.com" "safe.qq.com" "tss.qq.com" "tsssafe.qq.com" "ace.qq.com" "gsecurity.qq.com" "gametalk.qq.com" "game-safe.qq.com" "anti-cheat.qq.com" "anticheat.qq.com" "detect.qq.com" "monitor.qq.com" "report.qq.com" "feedback.qq.com" "cheat.qq.com" "ban.qq.com" "violation.qq.com" "penalty.qq.com" "tguard.qq.com" "tsafe.qq.com" "gamedefense.qq.com" "protect.qq.com" "guard.qq.com" "shield.qq.com" "fortress.qq.com" "defense.qq.com" "safeguard.qq.com" "trust.qq.com" "verify.qq.com" "authenticate.qq.com" "validation.qq.com" "check.qq.com" "scan.qq.com" "inspect.qq.com" "audit.qq.com" "review.qq.com" "compliance.qq.com" "policy.qq.com" "enforce.qq.com" ) GAME_SPECIFIC=( "pubgmhd.qq.com" "pg.qq.com" "battlegrounds.qq.com" "tencent.qq.com" "tmgp.qq.com" "pubg.qq.com" "mobile.qq.com" "gamematrix.qq.com" "match.qq.com" "battle.qq.com" "arena.qq.com" "rank.qq.com" "leaderboard.qq.com" "stats.qq.com" "achievement.qq.com" "challenge.qq.com" "event.qq.com" "activity.qq.com" "promotion.qq.com" "reward.qq.com" "shop.qq.com" "store.qq.com" "item.qq.com" "skin.qq.com" "weapon.qq.com" "character.qq.com" "avatar.qq.com" "emote.qq.com" "pass.qq.com" "season.qq.com" "clan.qq.com" "guild.qq.com" "team.qq.com" "squad.qq.com" "party.qq.com" ) APP_PACKAGES=( "com.tencent.tmgp.pubgmhd" "com.tencent.ig" "com.tencent.tmgp.pubg" "com.tencent.tmgp.pubgmhd.lite" "com.tencent.mobilepubg" "com.tencent.battlegrounds" ) KEYWORDS=( "punish" "penalty" "violation" "cheat" "detect" "monitor" "security" "tss" "ace" "ban" "safe" "guard" "protect" "verify" "authenticate" "validate" "audit" "review" "compliance" "enforce" "restrict" "control" "admin" "kernel" "driver" "hook" "inject" "modify" "abnormal" "suspicious" "malicious" "fraud" "exploit" "anti" "cheating" "detection" "scanning" "inspection" "surveillance" "defense" "fortress" "shield" "trust" ) IPTABLES_RULES=( "-A OUTPUT -p all -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'gtimg.cn' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tcdnos.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'wetvinfo.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'gcloud.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tpns.sh.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'weixin.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'wechat.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'wx.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'pay.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tenpay.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'gamematrix.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'game.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'qzone.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'qpic.cn' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'qlogo.cn' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'v.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'video.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'music.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'y.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'news.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'mail.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'cloud.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tencentcloud.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'security.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'safe.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'ad.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'ads.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'beacon.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'beacon.cloud.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'report.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'trace.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tpns.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'msdk.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tga.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'wetest.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'imtt.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'xunyou.mobi' --algo bm -j DROP" "-A OUTPUT -p all -m string --string '189.cn' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'gtimg.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'sogou.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'soso.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'futures.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'stock.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'sports.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'ent.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tech.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'lady.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'auto.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'house.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'baby.qq.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'cdc.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'mars.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'venus.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'mercury.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'jupiter.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'saturn.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'uranus.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'neptune.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'dev.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'test.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'pre.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'staging.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'api.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'open.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'console.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'monitor.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'log.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'metric.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'trace.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'debug.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'profiler.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'analyzer.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'collector.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'gateway.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'proxy.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'cache.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'storage.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'database.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'redis.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'mysql.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'mongodb.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'elasticsearch.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'kafka.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'rabbitmq.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'zookeeper.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'nacos.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'apollo.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'xxl-job.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'dubbo.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'spring.tencent.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'alibaba.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'taobao.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tmall.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'jd.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'pinduoduo.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'meituan.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'didi.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'bytedance.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'douyin.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'kuaishou.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'weibo.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'xiaohongshu.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'zhihu.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'bilibili.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'iqiyi.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'youku.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'netflix.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'youtube.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'google.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'facebook.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'twitter.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'instagram.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'whatsapp.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'telegram.org' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'discord.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'reddit.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tiktok.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'snapchat.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'pinterest.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'tumblr.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'flickr.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'dropbox.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'onedrive.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'icloud.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'amazon.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'ebay.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'alipay.com' --algo bm -j DROP" "-A OUTPUT -p all -m string --string 'wechat.com' --algo bm -j DROP" ) TS_RULES=( "-A OUTPUT -p udp --dport 9987 -j DROP" "-A OUTPUT -p udp --dport 9988 -j DROP" "-A OUTPUT -p udp --dport 10000-20000 -j DROP" "-A OUTPUT -p tcp --dport 10011 -j DROP" "-A OUTPUT -p tcp --dport 30033 -j DROP" "-A OUTPUT -p udp --dport 3478 -j DROP" "-A OUTPUT -p udp --dport 3479 -j DROP" "-A OUTPUT -p udp --dport 3480 -j DROP" "-A OUTPUT -p tcp --dport 3478 -j DROP" "-A OUTPUT -p tcp --dport 3479 -j DROP" "-A OUTPUT -p tcp --dport 3480 -j DROP" "-A OUTPUT -p udp --dport 443 -j DROP" "-A OUTPUT -p tcp --dport 443 -j DROP" "-A OUTPUT -p udp --dport 80 -j DROP" "-A OUTPUT -p tcp --dport 80 -j DROP" "-A OUTPUT -p udp --dport 8080 -j DROP" "-A OUTPUT -p tcp --dport 8080 -j DROP" "-A OUTPUT -p udp --dport 8443 -j DROP" "-A OUTPUT -p tcp --dport 8443 -j DROP" "-A OUTPUT -p udp --dport 5060 -j DROP" "-A OUTPUT -p udp --dport 5061 -j DROP" "-A OUTPUT -p tcp --dport 5060 -j DROP" "-A OUTPUT -p tcp --dport 5061 -j DROP" "-A OUTPUT -p udp --dport 16384-32767 -j DROP" "-A OUTPUT -p udp --dport 5004 -j DROP" "-A OUTPUT -p udp --dport 5005 -j DROP" "-A OUTPUT -p udp --dport 5006 -j DROP" "-A OUTPUT -p tcp --dport 21 -j DROP" "-A OUTPUT -p tcp --dport 22 -j DROP" "-A OUTPUT -p tcp --dport 23 -j DROP" "-A OUTPUT -p tcp --dport 25 -j DROP" "-A OUTPUT -p tcp --dport 53 -j DROP" "-A OUTPUT -p udp --dport 53 -j DROP" "-A OUTPUT -p tcp --dport 110 -j DROP" "-A OUTPUT -p tcp --dport 143 -j DROP" "-A OUTPUT -p tcp --dport 465 -j DROP" "-A OUTPUT -p tcp --dport 587 -j DROP" "-A OUTPUT -p tcp --dport 993 -j DROP" "-A OUTPUT -p tcp --dport 995 -j DROP" "-A OUTPUT -p tcp --dport 3306 -j DROP" "-A OUTPUT -p tcp --dport 5432 -j DROP" "-A OUTPUT -p tcp --dport 6379 -j DROP" "-A OUTPUT -p tcp --dport 27017 -j DROP" "-A OUTPUT -p tcp --dport 9200 -j DROP" "-A OUTPUT -p tcp --dport 9300 -j DROP" "-A OUTPUT -p tcp --dport 9092 -j DROP" "-A OUTPUT -p tcp --dport 2181 -j DROP" "-A OUTPUT -p tcp --dport 2888 -j DROP" "-A OUTPUT -p tcp --dport 3888 -j DROP" ) PORT_RULES=( "-A OUTPUT -p tcp --dport 80 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 8080 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 8443 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 53 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p udp --dport 53 -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 8080 -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p udp --dport 53 -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'alibaba.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'alibaba.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'taobao.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'taobao.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'google.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'google.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'youtube.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'youtube.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 80 -m string --string 'facebook.com' --algo bm -j DROP" "-A OUTPUT -p tcp --dport 443 -m string --string 'facebook.com' --algo bm -j DROP" ) PROTOCOL_RULES=( "-A OUTPUT -p tcp -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p udp -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p icmp -m string --string 'qq.com' --algo bm -j DROP" "-A OUTPUT -p tcp -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p udp -m string --string 'tencent.com' --algo bm -j DROP" "-A OUTPUT -p tcp -m string --string 'alibaba.com' --algo bm -j DROP" "-A OUTPUT -p udp -m string --string 'alibaba.com' --algo bm -j DROP" "-A OUTPUT -p tcp -m string --string 'google.com' --algo bm -j DROP" "-A OUTPUT -p udp -m string --string 'google.com' --algo bm -j DROP" "-A OUTPUT -p tcp -m string --string 'facebook.com' --algo bm -j DROP" "-A OUTPUT -p udp -m string --string 'facebook.com' --algo bm -j DROP" )