Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/node:net/BlockListMaddAddressMaddRangeMaddSubnetMcheckCoconstructorMfromJSONMisBlockListPrulesMtoJSONclass
net.BlockListclass BlockListThe BlockList object can be used with some network APIs to specify rules for disabling inbound or outbound access to specific IP addresses, IP ranges, or IP subnets.rules: readonly string[]The list of rules added to the blocklist.addAddress(address: string,type?: IPVersion): void;Adds a rule to block the given IP address.@param addressAn IPv4 or IPv6 address.@param typeEither 'ipv4' or 'ipv6'.addAddress(address: SocketAddress): void;Adds a rule to block the given IP address.@param addressAn IPv4 or IPv6 address.addRange(start: string,end: string,type?: IPVersion): void;Adds a rule to block a range of IP addresses from start (inclusive) toend (inclusive).@param startThe starting IPv4 or IPv6 address in the range.@param endThe ending IPv4 or IPv6 address in the range.@param typeEither 'ipv4' or 'ipv6'.addRange(start: SocketAddress,end: SocketAddress): void;Adds a rule to block a range of IP addresses from start (inclusive) toend (inclusive).@param startThe starting IPv4 or IPv6 address in the range.@param endThe ending IPv4 or IPv6 address in the range.addSubnet(net: SocketAddress,prefix: number): void;Adds a rule to block a range of IP addresses specified as a subnet mask.@param netThe network IPv4 or IPv6 address.@param prefixThe number of CIDR prefix bits. For IPv4, this must be a value between 0 and 32. For IPv6, this must be between 0 and 128.addSubnet(net: string,prefix: number,type?: IPVersion): void;Adds a rule to block a range of IP addresses specified as a subnet mask.@param netThe network IPv4 or IPv6 address.@param prefixThe number of CIDR prefix bits. For IPv4, this must be a value between 0 and 32. For IPv6, this must be between 0 and 128.@param typeEither 'ipv4' or 'ipv6'.check(address: SocketAddress): boolean;Returns true if the given IP address matches any of the rules added to theBlockList.const blockList = new net.BlockList(); blockList.addAddress('123.123.123.123'); blockList.addRange('10.0.0.1', '10.0.0.10'); blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); console.log(blockList.check('123.123.123.123')); // Prints: true console.log(blockList.check('10.0.0.3')); // Prints: true console.log(blockList.check('222.111.111.222')); // Prints: false // IPv6 notation for IPv4 addresses works: console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true @param addressThe IP address to checkcheck(address: string,type?: IPVersion): boolean;Returns true if the given IP address matches any of the rules added to theBlockList.const blockList = new net.BlockList(); blockList.addAddress('123.123.123.123'); blockList.addRange('10.0.0.1', '10.0.0.10'); blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); console.log(blockList.check('123.123.123.123')); // Prints: true console.log(blockList.check('10.0.0.3')); // Prints: true console.log(blockList.check('222.111.111.222')); // Prints: false // IPv6 notation for IPv4 addresses works: console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true @param addressThe IP address to check@param typeEither 'ipv4' or 'ipv6'.fromJSON(data: string | readonly string[]): void;const blockList = new net.BlockList(); const data = [ 'Subnet: IPv4 192.168.1.0/24', 'Address: IPv4 10.0.0.5', 'Range: IPv4 192.168.2.1-192.168.2.10', 'Range: IPv4 10.0.0.1-10.0.0.10', ]; blockList.fromJSON(data); blockList.fromJSON(JSON.stringify(data)); toJSON(): readonly string[];static isBlockList(value: unknown): value is BlockList;Returns true if the value is a net.BlockList.@param valueAny JS valueResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San FranciscoWe're hiring →智能索引记录
-
2026-03-02 13:06:20
综合导航
成功
标题:Above: Definition and Example EDU.COM
简介:Learn about the spatial term
-
2026-03-02 13:32:51
综合导航
成功
标题:Intellectual Property Law Firm IP Attorneys Fish & Richardson
简介:Fish & Richardson is the premier IP law firm. Our attorneys,
-
2026-03-02 20:55:24
综合导航
成功
标题:AI Cryptocurrency Trading Practice: DeepSeek Leads the Market, GPT-5 and Gemini Surprisingly Lag at the Bottom Bee Network
简介:In the world of cryptocurrency, human traders are often plag
-
2026-03-02 15:46:17
综合导航
成功
标题:거산고구마 상품 후기 달콤하고 쫀득해요
简介:거산고구마 자연 그대로의 달콤함, 신선한 맛으로 고객 만족이 높아요
-
2026-03-02 06:33:42
综合导航
成功
标题:Holger Fehlbier – EMEIA and EW Strategy & Transactions AI Lead EY - Estonia
简介:Contact and profile information for Holger Fehlbier, EMEIA a
-
2026-03-02 10:00:14
综合导航
成功
标题:Volksschule Siezenheim - a2s.com
简介:Nachhaltiger Schulbau für positive Lernerlebnisse: In der Vo
-
2026-03-02 20:58:19
综合导航
成功
标题:è¹é»çæ¼é³_è¹é»çææ_è¹é»çç¹ä½_è¯ç»ç½
简介:è¯ç»ç½è¹é»é¢é,ä»ç»è¹é»,è¹é»çæ¼é³,è¹é»æ¯
-
2026-03-02 18:36:12
综合导航
成功
标题:Employee Benefit News HR & Benefits News and Insights Employee Benefit News
简介:Employee Benefit News offers expert HR management, healthcar
-
2026-03-02 22:28:34
教育培训
成功
标题:英语四级不过怎么才能成为金融硕士研究生?-高顿教育
简介:疫情之下,考研不易。考研er起早贪黑学习,无数次步履匆忙,无数次对抗孤单,念念不忘,必有回响。很多同学担心四级成绩差影响
-
2026-03-02 16:08:47
综合导航
成功
标题:开讲啦陈一冰演讲稿:人生总有不完美-励志一生
简介:开讲啦陈一冰演讲稿:人生总有不完美_ 开讲啦陈一冰演讲稿:人生总有不完美 各位年轻的朋友们: 大家好,从小到大,大
-
2026-03-02 13:56:41
综合导航
成功
标题:清宸绝恋海兰珠传TXT百度最新章节最新章节_第九章 朝使来贺第1页_清宸绝恋海兰珠传TXT百度最新章节免费章节_恋上你看书网
简介:第九章 朝使来贺第1页_清宸绝恋海兰珠传TXT百度最新章节_彦昱_恋上你看书网
-
2026-03-02 13:15:22
综合导航
成功
标题:多余的东西_1500字_作文网
简介:我喜欢背上行囊,独自一人前往那春暖花开的远方,这一次我的选择是云天之巅。 云天之巅的云朵几乎是静止不动地悬挂在高空,相互
-
2026-03-02 22:11:31
综合导航
成功
标题:快穿之不当老实人最新章节_第211章 碰瓷进行时 11第1页_快穿之不当老实人免费章节_恋上你看书网
简介:第211章 碰瓷进行时 11第1页_快穿之不当老实人_Cx330鸭_恋上你看书网
-
2026-03-02 22:28:26
游戏娱乐
成功
标题:收集篇:林肯郡-秘密(2)_ 刺客信条英灵殿攻略_全支线任务全收集攻略_图文全攻略_3DM单机
简介:《刺客信条:英灵殿》图文全攻略,全支线任务全收集攻略(含“通关剧情流程”“全支线任务/全结局”“全收集攻略”)。《刺客信
-
2026-03-02 22:09:25
综合导航
成功
标题:å®æçæ¼é³_å®æçææ_宿çç¹ä½_è¯ç»ç½
简介:è¯ç»ç½å®æé¢é,ä»ç»å®æ,å®æçæ¼é³,宿æ¯
-
2026-03-02 16:13:49
综合导航
成功
标题:AI智能索引 - AI智能索引
简介:AI智能索引 - 提供全网公开链接智能索引服务,快速访问目标内容,支持分类筛选和智能导航
-
2026-03-02 13:27:53
综合导航
成功
标题:£50,000 damages and an injunction awarded in TikTok libel claim - 5RB Barristers
简介:£50,000 damages and an injunction awarded in TikTok libel cl
-
2026-03-02 08:25:01
综合导航
成功
标题:FS: Boosted MR2 Tshirt size large [Archive] - Toyota MR2 Message Board
简介:Sell for $25 new, this one has been worn twice. Size large,
-
2026-03-02 14:03:42
综合导航
成功
标题:《政客第二季》在线观看-迅雷下载-最新美剧-美剧网
简介:政客第二季剧情介绍:政客第二季是由布拉德·法尔查克,大卫·彼特拉克执导,佐伊·达奇,露西·宝通,本·普拉特,劳拉·德莱弗
-
2026-03-02 14:11:31
教育培训
成功
标题:(必备)夕阳作文300字
简介:在日常学习、工作抑或是生活中,大家都经常看到作文的身影吧,借助作文可以宣泄心中的情感,调节自己的心情。你知道作文怎样写才
-
2026-03-02 21:00:40
综合导航
成功
标题:è¿ç¿¼çæ¼é³_è¿ç¿¼çææ_è¿ç¿¼çç¹ä½_è¯ç»ç½
简介:è¯ç»ç½è¿ç¿¼é¢é,ä»ç»è¿ç¿¼,è¿ç¿¼çæ¼é³,è¿ç¿¼æ¯
-
2026-03-02 21:04:50
综合导航
成功
标题:《红白黑黄 第七季》在线观看-迅雷下载-美国动漫-美剧网
简介:红白黑黄 第七季剧情介绍:红白黑黄 第七季是由克里·肖克罗斯执导,林赛·琼斯 / 卡拉·埃伯利 / 艾伦·泽克 / 巴尔
-
2026-03-02 20:47:26
综合导航
成功
标题:ç£ç »çæ¼é³_ç£ç »çææ_ç£ç »çç¹ä½_è¯ç»ç½
简介:è¯ç»ç½ç£ç »é¢é,ä»ç»ç£ç »,ç£ç »çæ¼é³,ç£ç »æ¯
-
2026-03-02 13:08:50
综合导航
成功
标题:AI technology in Europe tracks construction progress.
简介:Keeping projects on schedule New artificial intelligence tec
-
2026-03-02 06:27:11
图片素材
成功
标题:半夏的作文300字 描写半夏的作文 关于半夏的作文-作文网
简介:作文网精选关于半夏的300字作文,包含半夏的作文素材,关于半夏的作文题目,以半夏为话题的300字作文大全,作文网原创名师
-
2026-03-02 22:32:56
综合导航
成功
标题:过度是什么意思_过度的词语解释-雄安文学网
简介:过度是什么意思?雄安文学网为您提供过度的的意思解释,解读过度的解释含义,包括基本解释和详细解释等。
-
2026-03-02 15:11:18
综合导航
成功
标题:ISG job portal - Code of Conduct
简介:Code of Conduct. ISG Personalmanagement GmbH commits itself
-
2026-03-02 18:19:29
综合导航
成功
标题:直播捉鬼系统_血色精灵_三百一十二章 事情真相_风云中文网
简介:风云中文网提供直播捉鬼系统(血色精灵)三百一十二章 事情真相在线阅读,所有小说均免费阅读,努力打造最干净的阅读环境,24
-
2026-03-02 20:51:59
综合导航
成功
标题:Neues Nachweisgesetz - Strengere Nachweispflichten im Arbeitsverhältnis - Das müssen Arbeitgeber wissen & tun! PKL - Rechtsanwälte und Wirtschaftsprüfer
简介:Ab 01.08.2022 gelten weitere wichtige neue Regelungen im Arb
-
2026-03-02 12:50:41
综合导航
成功
标题:Jonathan Singer - Law360 2013 Life Sciences MVP Fish
简介:Jonathan Singer in 2013 sealed a major Fed Cir victory direc