在 Java 中验证 IPv4 字符串

发布于 2024-10-10 01:43:14 字数 586 浏览 0 评论 0原文

Bellow 方法正在验证字符串是否是正确的 IPv4 地址,如果有效则返回 true。正则表达式和优雅方面的任何改进将不胜感激:

public static boolean validIP(String ip) {
    if (ip == null || ip.isEmpty()) return false;
    ip = ip.trim();
    if ((ip.length() < 6) & (ip.length() > 15)) return false;

    try {
        Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
        Matcher matcher = pattern.matcher(ip);
        return matcher.matches();
    } catch (PatternSyntaxException ex) {
        return false;
    }
}

Bellow method is validating if string is correct IPv4 address it returns true if it is valid. Any improvements in regex and elegance would be very appreciated:

public static boolean validIP(String ip) {
    if (ip == null || ip.isEmpty()) return false;
    ip = ip.trim();
    if ((ip.length() < 6) & (ip.length() > 15)) return false;

    try {
        Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
        Matcher matcher = pattern.matcher(ip);
        return matcher.matches();
    } catch (PatternSyntaxException ex) {
        return false;
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(17

余罪 2024-10-17 01:43:14

这是一种更容易阅读、效率稍低的方法。

public static boolean validIP (String ip) {
    try {
        if ( ip == null || ip.isEmpty() ) {
            return false;
        }

        String[] parts = ip.split( "\\." );
        if ( parts.length != 4 ) {
            return false;
        }

        for ( String s : parts ) {
            int i = Integer.parseInt( s );
            if ( (i < 0) || (i > 255) ) {
                return false;
            }
        }
        if ( ip.endsWith(".") ) {
            return false;
        }

        return true;
    } catch (NumberFormatException nfe) {
        return false;
    }
}

Here is an easier-to-read, slightly less efficient, way you could go about it.

public static boolean validIP (String ip) {
    try {
        if ( ip == null || ip.isEmpty() ) {
            return false;
        }

        String[] parts = ip.split( "\\." );
        if ( parts.length != 4 ) {
            return false;
        }

        for ( String s : parts ) {
            int i = Integer.parseInt( s );
            if ( (i < 0) || (i > 255) ) {
                return false;
            }
        }
        if ( ip.endsWith(".") ) {
            return false;
        }

        return true;
    } catch (NumberFormatException nfe) {
        return false;
    }
}
枉心 2024-10-17 01:43:14

更新: Commons-HttpClient 及其后继者 HttpComponents-HttpClient 已采用此功能。您可以像这样使用它的这个版本:InetAddressUtils.isIPv4Address(Str)


Apache Commons Validator 的开发版本有一个 InetAddressValidator 类,它有一个 isValidInet4Address(String) 方法执行检查以查看给定的 String 是否是有效的 IPv4 地址。

源代码可以从存储库中查看,因此如果您认为有任何改进,这可能会提供一些改进的想法。

快速浏览一下所提供的代码就会发现,您的方法正在每次调用该方法时编译一个Pattern。我会将 Pattern 类移出到 static 字段,以避免每次调用时昂贵的模式编译过程。

UPDATE: Commons-HttpClient and its successor HttpComponents-HttpClient have adopted this functionality. You can utilize this version of it like so: InetAddressUtils.isIPv4Address(Str).


The development version of Apache Commons Validator has a InetAddressValidator class which has a isValidInet4Address(String) method to perform a check to see that an given String is a valid IPv4 address.

The source code can be viewed from the repository, so that might provide some ideas for improvements, if you feel there are any.

A quick glance at the provided code shows that your method is compiling a Pattern on each invocation of the method. I would move that Pattern class out to a static field to avoid the costly pattern compilation process on each call.

山人契 2024-10-17 01:43:14

如果您想使用已发布版本同时支持 IPv4 和 IPv6 的库,可以使用 番石榴

boolean isValid = InetAddresses.isInetAddress("1.2.3.4");

If you want to use a library with a released version suppporting both IPv4 and IPv6 support, you can use Guava

boolean isValid = InetAddresses.isInetAddress("1.2.3.4");
千年*琉璃梦 2024-10-17 01:43:14

如果您不介意对 www.example.com 等无效 IP 地址使用 dns 解析,则可以使用 InetAddress 要检查的方法:

public static final boolean checkIPv4(final String ip) {
    boolean isIPv4;
    try {
    final InetAddress inet = InetAddress.getByName(ip);
    isIPv4 = inet.getHostAddress().equals(ip)
            && inet instanceof Inet4Address;
    } catch (final UnknownHostException e) {
    isIPv4 = false;
    }
    return isIPv4;
}

该方法检查它是否是 Inet4Address 的实例,如果该参数是 IP 地址而不是主机名。
如果您期望使用大量主机名作为参数,请注意此实现使用 DNS 来尝试解析它。这可能是一个性能问题。

否则你可能会达到高峰
boolean sun.net.util.IPAddressUtil.isIPv4LiteralAddress(String src) 如何解析字符串以进行 IPv4 检查。

If you don't mind using dns resolution on invalid ip-addresses like www.example.com, you can use the InetAddress methods to check:

public static final boolean checkIPv4(final String ip) {
    boolean isIPv4;
    try {
    final InetAddress inet = InetAddress.getByName(ip);
    isIPv4 = inet.getHostAddress().equals(ip)
            && inet instanceof Inet4Address;
    } catch (final UnknownHostException e) {
    isIPv4 = false;
    }
    return isIPv4;
}

The method checks if it is an instance of Inet4Address and if the parameter was the ip-address and not the hostname.
If you expect a lot of hostnames as parameters, beware that this implementation uses DNS to try to resolve it. This might be a performance concern.

Otherwise you can have a peak into
boolean sun.net.util.IPAddressUtil.isIPv4LiteralAddress(String src) how the String is parsed there for IPv4-check.

孤檠 2024-10-17 01:43:14

下面是一个使用 Java 8 流来检查地址是否由 0 到 255(含)之间的 4 个数字组成的解决方案,并用点分隔:

public class IpValidation {

    /**
     * Check that a string represents a decimal number
     * @param string The string to check
     * @return true if string consists of only numbers without leading zeroes, false otherwise
     */
    public static boolean isDecimal(String string) {
        // Check whether string has a leading zero but is not "0"
        if (string.startsWith("0")) {
            return string.length() == 1;
        }
        for(char c : string.toCharArray()) {
            if(c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }

    public static boolean isIp(String string) {
        String[] parts = string.split("\\.", -1);
        return parts.length == 4 // 4 parts
                && Arrays.stream(parts)
                .filter(IpValidation::isDecimal) // Only decimal numbers
                .map(Integer::parseInt)
                .filter(i -> i <= 255 && i >= 0) // Must be inside [0, 255]
                .count() == 4; // 4 numerical parts inside [0, 255]
    }
}

Here's a solution that uses Java 8 streams to check that the address consists of exactly 4 numbers between 0 and 255 inclusive, separated by dots:

public class IpValidation {

    /**
     * Check that a string represents a decimal number
     * @param string The string to check
     * @return true if string consists of only numbers without leading zeroes, false otherwise
     */
    public static boolean isDecimal(String string) {
        // Check whether string has a leading zero but is not "0"
        if (string.startsWith("0")) {
            return string.length() == 1;
        }
        for(char c : string.toCharArray()) {
            if(c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }

    public static boolean isIp(String string) {
        String[] parts = string.split("\\.", -1);
        return parts.length == 4 // 4 parts
                && Arrays.stream(parts)
                .filter(IpValidation::isDecimal) // Only decimal numbers
                .map(Integer::parseInt)
                .filter(i -> i <= 255 && i >= 0) // Must be inside [0, 255]
                .count() == 4; // 4 numerical parts inside [0, 255]
    }
}
指尖凝香 2024-10-17 01:43:14

this 中查找正则表达式示例

package com.mkyong.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class IPAddressValidator{

    private Pattern pattern;
    private Matcher matcher;

    private static final String IPADDRESS_PATTERN = 
        "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";

    public IPAddressValidator(){
      pattern = Pattern.compile(IPADDRESS_PATTERN);
    }

   /**
    * Validate ip address with regular expression
    * @param ip ip address for validation
    * @return true valid ip address, false invalid ip address
    */
    public boolean validate(final String ip){         
      matcher = pattern.matcher(ip);
      return matcher.matches();             
    }
}

Find regex example from this

package com.mkyong.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class IPAddressValidator{

    private Pattern pattern;
    private Matcher matcher;

    private static final String IPADDRESS_PATTERN = 
        "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
        "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";

    public IPAddressValidator(){
      pattern = Pattern.compile(IPADDRESS_PATTERN);
    }

   /**
    * Validate ip address with regular expression
    * @param ip ip address for validation
    * @return true valid ip address, false invalid ip address
    */
    public boolean validate(final String ip){         
      matcher = pattern.matcher(ip);
      return matcher.matches();             
    }
}
桃酥萝莉 2024-10-17 01:43:14

认为这个解决方案非常优雅,尽管需要花一点时间才能理解它。

基本思想是获取一个子字符串并验证它。
请注意,我交换了 x 和 y,因为子字符串的开头始终是最后一个加 1 的结尾。

这个解决方案是比正则表达式变体快大约 20 倍,比分割快 2 倍。

public static boolean validIP(String ip) {
    if(ip == null || ip.length() < 7 || ip.length() > 15) return false;

    try {
        int x = 0;
        int y = ip.indexOf('.');

        if (y == -1 || ip.charAt(x) == '-' || Integer.parseInt(ip.substring(x, y)) > 255) return false;

        x = ip.indexOf('.', ++y);
        if (x == -1 || ip.charAt(y) == '-' || Integer.parseInt(ip.substring(y, x)) > 255) return false;

        y = ip.indexOf('.', ++x);
        return  !(y == -1 ||
                ip.charAt(x) == '-' ||
                Integer.parseInt(ip.substring(x, y)) > 255 ||
                ip.charAt(++y) == '-' ||
                Integer.parseInt(ip.substring(y, ip.length())) > 255 ||
                ip.charAt(ip.length()-1) == '.');

    } catch (NumberFormatException e) {
        return false;
    }
}

如果您知道会有很多错误的 IP,请考虑在第一个 if 下面添加以下代码。这将使代码速度慢 1.5 倍,但如果出现错误,速度会提高 700 倍

    for (int i = 0; i < ip.length(); i++) {
        if (!Character.isDigit(ip.charAt(i)) && ip.charAt(i) != '.') return false;
    }

In think this solution is quite elegant, although it takes a minute to understand it.

The basic idea is to take a sub-string and than validate it.
Please note that I switch x and y, since the start of a sub-string will always be the end of the last one plus 1.

This solution is about 20x faster than a regex variant and 2x faster than splitting.

public static boolean validIP(String ip) {
    if(ip == null || ip.length() < 7 || ip.length() > 15) return false;

    try {
        int x = 0;
        int y = ip.indexOf('.');

        if (y == -1 || ip.charAt(x) == '-' || Integer.parseInt(ip.substring(x, y)) > 255) return false;

        x = ip.indexOf('.', ++y);
        if (x == -1 || ip.charAt(y) == '-' || Integer.parseInt(ip.substring(y, x)) > 255) return false;

        y = ip.indexOf('.', ++x);
        return  !(y == -1 ||
                ip.charAt(x) == '-' ||
                Integer.parseInt(ip.substring(x, y)) > 255 ||
                ip.charAt(++y) == '-' ||
                Integer.parseInt(ip.substring(y, ip.length())) > 255 ||
                ip.charAt(ip.length()-1) == '.');

    } catch (NumberFormatException e) {
        return false;
    }
}

If you know that you'll have a lot wrong IPs consider adding the following code below the first if. This will make the code 1.5x slower but in case of an error improve it by 700x

    for (int i = 0; i < ip.length(); i++) {
        if (!Character.isDigit(ip.charAt(i)) && ip.charAt(i) != '.') return false;
    }
浪漫人生路 2024-10-17 01:43:14

尝试使用以下 IPv4 正则表达式

String ip4Regex="^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$";

希望它有帮助:)

Try using the following regrex for IPv4

String ip4Regex="^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$";

hope it helps :)

北城孤痞 2024-10-17 01:43:14

如果您使用问题中的代码,您需要将该行更改

if ((ip.length() < 6) & (ip.length() > 15)) return false;

为:

if ((ip.length() <= 6) || (ip.length() > 15)) return false;

If you use the code in the question, you'll want to change the line:

if ((ip.length() < 6) & (ip.length() > 15)) return false;

to

if ((ip.length() <= 6) || (ip.length() > 15)) return false;
黯淡〆 2024-10-17 01:43:14

大多数答案(除了 Michael Konietzka 的答案)都是错误的:例如,10.8 是一个有效的 IP4 地址(10.0.0.8 的简写)。

请参阅IP 地址的文本表示 Java 规范。

如在参考文献中可以看到的,为了检查数字表示,可能有 1 到 4 个部分,并且在每种情况下对这些部分应用不同的限制。

Most of the answers (except that of Michael Konietzka) are wrong: 10.8, for instance, is a valid IP4 address (a shorthand for 10.0.0.8).

SeeTextual representation of IP addresses in the Java specifications.

As may be seen in the reference, to check a numeric representation, there may be 1 to 4 parts, and in each case different limitations on the parts apply.

夏末染殇 2024-10-17 01:43:14

我认为正确的方法是构建一个 IPAddress 类并通过为其提供 IP 地址的字符串表示形式来实例化它。

通过这种方式,您可以将不同的验证步骤拆分为实例方法,并进行一些关注点分离

例如,这里通常是它自己的方法,简单地调用它isEmpty

return (ip == null || ip.isEmpty());

此外,这应该是一个单独的方法,您可以调用它hasProbableLength

ip = ip.trim();
return ((ip.length() < 6) & (ip.length() > 15));

这里发生了很多事情。我会尝试打破这个问题,也许尝试完全跳过正则表达式。

try {
    Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
    Matcher matcher = pattern.matcher(ip);
    return matcher.matches();
} catch (PatternSyntaxException ex) {
    return false;
}

我首先将字符串按点分开,然后看到正好得到四个组。调用此方法 divideIntoGroups

然后,我将验证每个组的值是否在 0 到 255 之间。调用此方法 validateGroups

现在您已经有了这个方法,如果您想扩展这个类来查找 IP 是否是本地主机或者是否是广播地址,这很容易做到。这就是关注点分离为您提供的功能。

您还可以准确判断哪一项验证规则在 IP 地址字符串验证中被破坏。正则表达式不会的东西。

I think the proper way is to build an IPAddress class and instanciate it by giving it a string representation of the the ip address.

This way you can split out the different validation steps into instance methods and get some separation of concern going.

For instance, this here is typically it's own method, call this simply isEmpty:

return (ip == null || ip.isEmpty());

Also this should be a separate method, you could call this one hasProbableLength.

ip = ip.trim();
return ((ip.length() < 6) & (ip.length() > 15));

Here there are lots of things going on. I would try to break this up and perhaps try to skip the regex completely.

try {
    Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
    Matcher matcher = pattern.matcher(ip);
    return matcher.matches();
} catch (PatternSyntaxException ex) {
    return false;
}

I would first split the string on dots and see that I get exactly four groups. Call this method divideIntoGroups

I would then validate each of the groups for being a value between 0 and 255. Call this method validateGroups

Now that you have this, if you ever want to extend this class to also look for if the IP is localhost or if it is a broadcast address, it is pretty easy to do this. This is what separation of concerns gives you.

You can also tell exactly which one of your validation rules was broken in the validation of the IP address string. Something that regex will not.

貪欢 2024-10-17 01:43:14

IPAddress Java 库 会做到这一点。 javadoc 可在链接中找到。免责声明:我是项目经理。

该库透明地支持 IPv4 和 IPv6,因此验证两者的工作方式如下,并且它还支持 CIDR 前缀长度 IPC4 地址。它支持更不寻常的格式,例如 inet_aton (例如,在另一个答案中提到了 10.8)

验证地址是否有效:

    String str = "1.2.3.4";
    IPAddressString addrString = new IPAddressString(str);
    try {
         IPAddress addr = addrString.toAddress();
         ...
    } catch(AddressStringException e) {
        //e.getMessage provides validation issue
    }

The IPAddress Java library will do it. The javadoc is available at the link. Disclaimer: I am the project manager.

This library supports IPv4 and IPv6 transparently, so validating either works the same below, and it also supports CIDR prefix-length IPC4 addresses as well. It supports the more unusual formats like inet_aton (for example 10.8 was mentioned in another answer here)

Verify if an address is valid:

    String str = "1.2.3.4";
    IPAddressString addrString = new IPAddressString(str);
    try {
         IPAddress addr = addrString.toAddress();
         ...
    } catch(AddressStringException e) {
        //e.getMessage provides validation issue
    }
榕城若虚 2024-10-17 01:43:14

我发现检查给定 ip 在 ipv4 中是否正确的最简单方法是使用 commons-validator-1.4.0.jar 有类:--

org.apache.commons.validator.routines.InetAddressValidator

InetAddressValidator

例如

InetAddressValidator inetValidator = InetAddressValidator.getInstance();
inetValidator.isValidInet4Address(yourIPAddress);

使用这个简单的正则表达式:--

  "^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$";

Most simple way I found to check given ip is correctly in ipv4 is to use commons-validator-1.4.0.jar has class:--

org.apache.commons.validator.routines.InetAddressValidator

InetAddressValidator

E.g.

InetAddressValidator inetValidator = InetAddressValidator.getInstance();
inetValidator.isValidInet4Address(yourIPAddress);

which uses this simple regex :--

  "^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$";
云淡月浅 2024-10-17 01:43:14

这将对你有用,


boolean isIPv4Address(String inputString) {
    String[] splitString = inputString.split("[.]");
    if (splitString.length > 4) {
        return false;
    }
    for (String string : splitString) {
        if (string.isEmpty()) {
            return false;
        }
        if (!string.matches("[0-9]{1,3}")) {
            return false;
        }
        int number = Integer.parseInt(string);
        if (!(number >= 0 && number <= 255)) {
            return false;
        }
    }
    return true;
}

It will be useful for you,


boolean isIPv4Address(String inputString) {
    String[] splitString = inputString.split("[.]");
    if (splitString.length > 4) {
        return false;
    }
    for (String string : splitString) {
        if (string.isEmpty()) {
            return false;
        }
        if (!string.matches("[0-9]{1,3}")) {
            return false;
        }
        int number = Integer.parseInt(string);
        if (!(number >= 0 && number <= 255)) {
            return false;
        }
    }
    return true;
}

饭团 2024-10-17 01:43:14

我建议使用您正在开发的平台/框架上可用的内容。

如果您认为没有什么足够好,那么您可能只想将已编译的正则表达式添加到辅助类中。例如, Android 框架的实现方式如下

public static final Pattern IP_ADDRESS
    = Pattern.compile(
        "((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
        + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
        + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
        + "|[1-9][0-9]|[0-9]))");

I would suggest using what's available on the platform/framework you are developing.

If there's nothing you consider good enough, then you might just want to add a compiled regex to a helper class. For instance, here's how the Android framework does it:

public static final Pattern IP_ADDRESS
    = Pattern.compile(
        "((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
        + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
        + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
        + "|[1-9][0-9]|[0-9]))");
苍景流年 2024-10-17 01:43:14
boolean isValid = inetAddressValidator.isValid(hostName) || hostName.equalsIgnoreCase("localhost");

与 coobird 相同的答案。只需将 localhost 添加到语句中即可。大多数环境都将“localhost”作为有效的主机名。它不是 ipv4 格式,但应包含它以考虑有效性。

boolean isValid = inetAddressValidator.isValid(hostName) || hostName.equalsIgnoreCase("localhost");

same answer as coobird. Just add localhost to the statement. Most of the environments takes 'localhost' as a valid host name. It is not a ipv4 format but it should be included to consider validity.

浪漫之都 2024-10-17 01:43:14
public static boolean ipv4Check(String ipAddress){

    try{
        if(ipAddress!=null && !ipAddress.isEmpty()){
            String [] ip = ipAddress.split("\\.");
            if(ip.length!=4)
                return false;

            for(int i=0;i<=ip.length-1;i++){
                int j=Integer.parseInt(ip[i]);
                if(j<0 || j>255){
                    return false;
                }
            }
            if ( ipAddress.endsWith(".") ) {
                return false;
            }
            if ( ipAddress.startsWith(".") ) {
                return false;
            }

        }
        return true;
    } catch (NumberFormatException ex) {
        return false;
    }       
}
public static boolean ipv4Check(String ipAddress){

    try{
        if(ipAddress!=null && !ipAddress.isEmpty()){
            String [] ip = ipAddress.split("\\.");
            if(ip.length!=4)
                return false;

            for(int i=0;i<=ip.length-1;i++){
                int j=Integer.parseInt(ip[i]);
                if(j<0 || j>255){
                    return false;
                }
            }
            if ( ipAddress.endsWith(".") ) {
                return false;
            }
            if ( ipAddress.startsWith(".") ) {
                return false;
            }

        }
        return true;
    } catch (NumberFormatException ex) {
        return false;
    }       
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文