static bool isPublicIP(S ip) ctex { InetAddress addr = InetAddress.getByName(ip); ip = addr.getHostAddress(); ret !( startsWithOneOf(ip, "169.254.", "127.", "192.168.", "fc", "fd", "fe") || addr.isSiteLocalAddress()); }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004117 |
Snippet name: | isPublicIP |
Eternal ID of this version: | #1004117/6 |
Text MD5: | dea8db9e5de101ecb33c9c4ff65318c2 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-25 23:56:54 |
Source code size: | 239 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 628 / 629 |
Version history: | 5 change(s) |
Referenced in: | [show references] |