@Test
public void addAccessDomain() {

    List<String> accessDomains = new ArrayList<>();
    accessDomains.add("*.grouter.com");
    String currentUrl = "https://wap.grouter.com";
    if (currentUrl == null || currentUrl.length() == 0) {
        System.out.println("匹配失败");
        return ;
    }
    try {
        Uri uri = Uri.parse(currentUrl);
        String host = uri.getHost();
        for (String reg : accessDomains) {
            if (host.equals(reg)) {
                System.out.println("匹配成功");
                return ;
            }
            if (reg.startsWith("*") && currentUrl.contains(reg.substring(2))) {
                System.out.println("匹配成功");
                return ;
            }
        }
    }catch (Exception e){
        e.printStackTrace();
    }
    System.out.println("匹配失败");
    return ;
}