anyconnect 在 ios 上分流很爽,但安卓版本的 anyconnect 却不支持,怎么解? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
windhunter
V2EX    Android

anyconnect 在 ios 上分流很爽,但安卓版本的 anyconnect 却不支持,怎么解?

  •  
  •   windhunter 2016-09-15 08:47:04 +08:00 33741 次点击
    这是一个创建于 3381 天前的主题,其中的信息可能已经有所发展或是发生改变。
    同一台 server , ios 版 anyconnect 连上去境内外分流,
    但我能找到的 android 机,版本从 4.2 到 6.0 ,用 anyconnect 后,流量却统统走 server 了。

    各位安卓党是怎么解决这个问题的?
    48 条回复    2018-01-02 11:31:16 +08:00
    tairan2006
        1
    tairan2006  
       2016-09-15 09:48:35 +08:00 via Android
    基本用 hosts 就能翻绝大部分网站了…
    mandymak
        2
    mandymak  
       2016-09-15 11:15:20 +08:00
    @windhunter PAC 分流?
    LU35
        3
    LU35  
       2016-09-15 11:35:54 +08:00 via Android
    不都是服务器设置的分流吗
    alect
        4
    alect  
       2016-09-15 13:00:47 +08:00
    本人 ios 和 android 都正常分流,不知楼主怎么设置的啊
    tinybaby365
        5
    tinybaby365  
       2016-09-15 13:12:42 +08:00
    Anyconnect 有个缺陷, server 给 client 推的路由在 vpn 连接断掉后会有残留。
    windhunter
        6
    windhunter  
    OP
       2016-09-15 14:04:55 +08:00
    @mandymak 不是,用的是 no-route 简单的国内外分流。
    @LU35 就是在服务器端设置,但是现在是 iOS 的 anyconnect 客户端有效分流, android 版 anconnect 的流量都走服务器了,所以我才纳闷。
    @alect 配置文件来自 https://github.com/CNMan/ocserv-cn-no-route 只简单的替换了自己的 ip 、端口和证书。现在 iOS 版没问题, Android 版本无效,我才认为症结在 anyconnect 客户端。
    @jiangfengbing 这事情已经不在意了。先调通。

    补充说明一下,我 server 环境是 debian 7.11 32bit,ocsver 0.11.4. 配置文件如上所说来自 https://github.com/CNMan/ocserv-cn-no-route
    xrui
        7
    xrui  
       2016-09-15 14:12:02 +08:00 via Android
    安卓好像真的没有 no-route ……
    我就是 iPad 上可以,安卓不行
    datou
        8
    datou  
       2016-09-15 14:16:31 +08:00
    安卓版的 openconnect 客户端也不行吗?
    LU35
        9
    LU35  
       2016-09-15 14:21:52 +08:00
    @windhunter 肯定是你那边的问题.我安卓上也装过 anyconnect.在服务器上设置的分流.使用时分流是正常的.
    kkxxxxxxx
        10
    kkxxxxxxx  
       2016-09-15 15:50:57 +08:00
    缺点:路由表数量限制,分流效果有限,速度上不去
    alect
        11
    alect  
       2016-09-15 17:57:34 +08:00
    安卓别用 no-route,无效。
    fishg
        12
    fishg  
       2016-09-15 18:05:34 +08:00
    安卓不支持 no-route ,用 route 表比较通用
    taresky
        13
    taresky  
       2016-09-15 19:42:52 +08:00 via iPhone
    自寻烦恼啊
    Vicer
        14
    Vicer  
       2016-09-15 20:07:08 +08:00 via Android
    安卓,为什么不用 openconnect
    windhunter
        15
    windhunter  
    OP
       2016-09-15 22:56:54 +08:00
    @datou @Vicer 是的,安卓版本 openconnect 和 anyconnect 都装了,不行。
    @LU35 那么,求个 ocserv 的配置文件。我去比较比较...
    @kkxxxxxxx 我知道这个缺点,但, anyconnect 自动重连很方便,而且不用越狱不用 root.
    @alect @fishg 如果安卓版不支持 no-route,那么 route 的分流表我不会搞,另外多半要超过 200 条的路由限制。另外 @LU35 提到他用 no-route 分流成功,我还是希望能尝试下
    @taresky 算是吧。人生贵在折腾!哈!
    kozora
        16
    kozora  
       2016-09-16 01:19:44 +08:00
    ios 的其实支持 pac 分流的
    kkxxxxxxx
        17
    kkxxxxxxx  
       2016-09-16 02:10:08 +08:00
    @windhunter iOS 上现在这么多支持 SS 的 App ,随便一个都很方便啊
    Vicer
        18
    Vicer  
       2016-09-16 03:06:38 +08:00   1
    正在用 OpenConnect ,绝对没有问题。
    另外给你个配置

    #auth = "plain[passwd=/etc/ocserv/ocpasswd]"
    auth = "certificate"

    # TCP and UDP port number
    tcp-port = 443
    udp-port = 443

    server-cert = /etc/ocserv/server.cert.pem
    server-key = /etc/ocserv/server.key.pem
    ca-cert = /etc/ocserv/ca.cert.pem

    socket-file = /var/run/ocserv-socket
    pid-file = /var/run/ocserv.pid
    run-as-user = nobody
    run-as-group = daemon
    cert-user-oid = 2.5.4.3
    isolate-workers = false
    max-clients = 256
    max-same-clients = 128
    keepalive = 32400
    dpd = 30
    mobile-dpd = 120
    #output-buffer = 1000
    try-mtu-discovery = true
    compression = true
    no-compress-limit = 256
    auth-timeout = 40
    idle-timeout = 1200
    mobile-idle-timeout = 1200
    cookie-timeout = 43200
    persistent-cookies = true
    deny-roaming = false
    rekey-time = 43200
    rekey-method = ssl
    use-utmp = true
    use-occtl = true
    device = ocserv
    predictable-ips = false
    ping-leases = false
    cisco-client-compat = true
    tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0"
    ipv4-network = 192.168.8.0
    ipv4-netmask = 255.255.255.0
    dns = 192.168.8.1
    #dns = 182.254.116.116

    # no-route list
    no-route = 你的服务器 IP/255.255.255.255
    no-route = 192.168.0.0/255.255.0.0

    no-route = 1.0.0.0/255.192.0.0
    no-route = 1.64.0.0/255.224.0.0
    no-route = 1.112.0.0/255.248.0.0
    no-route = 1.176.0.0/255.240.0.0
    no-route = 1.192.0.0/255.240.0.0
    no-route = 14.0.0.0/255.224.0.0
    no-route = 14.96.0.0/255.224.0.0
    no-route = 14.128.0.0/255.224.0.0
    no-route = 14.192.0.0/255.224.0.0
    no-route = 27.0.0.0/255.192.0.0
    no-route = 27.96.0.0/255.224.0.0
    no-route = 27.128.0.0/255.224.0.0
    no-route = 27.176.0.0/255.240.0.0
    no-route = 27.192.0.0/255.224.0.0
    no-route = 27.224.0.0/255.252.0.0
    no-route = 36.0.0.0/255.192.0.0
    no-route = 36.96.0.0/255.224.0.0
    no-route = 36.128.0.0/255.192.0.0
    no-route = 36.192.0.0/255.224.0.0
    no-route = 36.240.0.0/255.240.0.0
    no-route = 39.0.0.0/255.255.0.0
    no-route = 39.64.0.0/255.224.0.0
    no-route = 39.96.0.0/255.240.0.0
    no-route = 39.128.0.0/255.192.0.0
    no-route = 40.72.0.0/255.254.0.0
    no-route = 40.125.128.0/255.255.128.0
    no-route = 40.126.64.0/255.255.192.0
    no-route = 42.0.0.0/255.248.0.0
    no-route = 42.48.0.0/255.240.0.0
    no-route = 42.80.0.0/255.240.0.0
    no-route = 42.96.0.0/255.224.0.0
    no-route = 42.128.0.0/255.128.0.0
    no-route = 43.224.0.0/255.224.0.0
    no-route = 45.65.16.0/255.255.240.0
    no-route = 47.92.0.0/255.252.0.0
    no-route = 47.96.0.0/255.224.0.0
    no-route = 49.0.0.0/255.248.0.0
    no-route = 49.48.0.0/255.248.0.0
    no-route = 49.64.0.0/255.224.0.0
    no-route = 49.112.0.0/255.240.0.0
    no-route = 49.128.0.0/255.224.0.0
    no-route = 49.208.0.0/255.240.0.0
    no-route = 49.224.0.0/255.224.0.0
    no-route = 52.80.0.0/255.252.0.0
    no-route = 54.222.0.0/255.254.0.0
    no-route = 58.0.0.0/255.128.0.0
    no-route = 58.128.0.0/255.224.0.0
    no-route = 58.192.0.0/255.224.0.0
    no-route = 58.240.0.0/255.240.0.0
    no-route = 59.32.0.0/255.224.0.0
    no-route = 59.64.0.0/255.224.0.0
    no-route = 59.96.0.0/255.240.0.0
    no-route = 59.144.0.0/255.240.0.0
    no-route = 59.160.0.0/255.224.0.0
    no-route = 59.192.0.0/255.192.0.0
    no-route = 60.0.0.0/255.224.0.0
    no-route = 60.48.0.0/255.240.0.0
    no-route = 60.160.0.0/255.224.0.0
    no-route = 60.192.0.0/255.192.0.0
    no-route = 61.0.0.0/255.192.0.0
    no-route = 61.80.0.0/255.248.0.0
    no-route = 61.128.0.0/255.192.0.0
    no-route = 61.224.0.0/255.224.0.0
    no-route = 91.234.36.0/255.255.255.0
    no-route = 101.0.0.0/255.128.0.0
    no-route = 101.128.0.0/255.224.0.0
    no-route = 101.192.0.0/255.240.0.0
    no-route =101.224.0.0/255.224.0.0
    no-route = 103.0.0.0/255.0.0.0
    no-route = 106.0.0.0/255.128.0.0
    no-route = 106.224.0.0/255.240.0.0
    no-route = 110.0.0.0/255.128.0.0
    no-route = 110.144.0.0/255.240.0.0
    no-route = 110.160.0.0/255.224.0.0
    no-route = 110.192.0.0/255.192.0.0
    no-route = 111.0.0.0/255.192.0.0
    no-route = 111.64.0.0/255.224.0.0
    no-route = 111.112.0.0/255.240.0.0
    no-route = 111.128.0.0/255.192.0.0
    no-route = 111.192.0.0/255.224.0.0
    no-route = 111.224.0.0/255.240.0.0
    no-route = 112.0.0.0/255.128.0.0
    no-route = 112.128.0.0/255.240.0.0
    no-route = 112.192.0.0/255.252.0.0
    no-route = 112.224.0.0/255.224.0.0
    no-route = 113.0.0.0/255.128.0.0
    no-route = 113.128.0.0/255.240.0.0
    no-route = 113.192.0.0/255.192.0.0
    no-route = 114.16.0.0/255.240.0.0
    no-route = 114.48.0.0/255.240.0.0
    no-route = 114.64.0.0/255.192.0.0
    no-route = 114.128.0.0/255.240.0.0
    no-route = 114.192.0.0/255.192.0.0
    no-route = 115.0.0.0/255.0.0.0
    no-route = 116.0.0.0/255.0.0.0
    no-route = 117.0.0.0/255.128.0.0
    no-route = 117.128.0.0/255.192.0.0
    no-route = 118.16.0.0/255.240.0.0
    no-route = 118.64.0.0/255.192.0.0
    no-route = 118.128.0.0/255.128.0.0
    no-route = 119.0.0.0/255.128.0.0
    no-route = 119.128.0.0/255.192.0.0
    no-route = 119.224.0.0/255.224.0.0
    no-route = 120.0.0.0/255.192.0.0
    no-route = 120.64.0.0/255.224.0.0
    no-route = 120.128.0.0/255.240.0.0
    no-route = 120.192.0.0/255.192.0.0
    no-route = 121.0.0.0/255.128.0.0
    no-route = 121.192.0.0/255.192.0.0
    no-route = 122.0.0.0/254.0.0.0
    no-route = 124.0.0.0/255.0.0.0
    no-route = 125.0.0.0/255.128.0.0
    no-route = 125.160.0.0/255.224.0.0
    no-route = 125.192.0.0/255.192.0.0
    no-route = 137.59.88.0/255.255.252.0
    no-route = 139.0.0.0/255.224.0.0
    no-route = 139.128.0.0/255.128.0.0
    no-route = 140.64.0.0/255.240.0.0
    no-route = 140.128.0.0/255.240.0.0
    no-route = 140.192.0.0/255.192.0.0
    no-route = 144.0.0.0/255.255.0.0
    no-route = 144.7.0.0/255.255.0.0
    no-route = 144.12.0.0/255.255.0.0
    no-route = 144.52.0.0/255.255.0.0
    no-route = 144.123.0.0/255.255.0.0
    no-route = 144.255.0.0/255.255.0.0
    no-route = 146.196.56.0/255.255.252.0
    no-route = 150.0.0.0/255.255.0.0
    no-route = 150.96.0.0/255.224.0.0
    no-route = 150.128.0.0/255.240.0.0
    no-route = 150.192.0.0/255.192.0.0
    no-route = 152.104.128.0/255.255.128.0
    no-route = 153.0.0.0/255.192.0.0
    no-route = 153.96.0.0/255.224.0.0
    no-route = 157.0.0.0/255.255.0.0
    no-route = 157.18.0.0/255.255.0.0
    no-route = 157.61.0.0/255.255.0.0
    no-route = 157.122.0.0/255.255.0.0
    no-route = 157.148.0.0/255.255.0.0
    no-route = 157.156.0.0/255.255.0.0
    no-route = 157.255.0.0/255.255.0.0
    no-route = 159.226.0.0/255.255.0.0
    no-route = 160.19.208.0/255.255.248.0
    no-route = 160.19.216.0/255.255.252.0
    no-route = 160.20.48.0/255.255.252.0
    no-route = 161.207.0.0/255.255.0.0
    no-route = 162.105.0.0/255.255.0.0
    no-route = 163.0.0.0/255.192.0.0
    no-route = 163.96.0.0/255.224.0.0
    no-route = 163.128.0.0/255.192.0.0
    no-route = 163.192.0.0/255.224.0.0
    no-route = 166.111.0.0/255.255.0.0
    no-route = 167.139.0.0/255.255.0.0
    no-route = 167.189.0.0/255.255.0.0
    no-route = 167.220.244.0/255.255.252.0
    no-route = 168.160.0.0/255.255.0.0
    no-route = 170.179.0.0/255.255.0.0
    no-route = 171.0.0.0/255.128.0.0
    no-route = 171.192.0.0/255.224.0.0
    no-route = 175.0.0.0/255.128.0.0
    no-route = 175.128.0.0/255.192.0.0
    no-route = 180.64.0.0/255.192.0.0
    no-route = 180.128.0.0/255.128.0.0
    no-route = 182.0.0.0/255.0.0.0
    no-route = 183.0.0.0/255.192.0.0
    no-route = 183.64.0.0/255.224.0.0
    no-route = 183.128.0.0/255.128.0.0
    no-route = 192.124.154.0/255.255.255.0
    no-route = 192.188.170.0/255.255.255.0
    no-route = 202.0.0.0/255.128.0.0
    no-route = 202.128.0.0/255.192.0.0
    no-route = 202.192.0.0/255.224.0.0
    no-route = 203.0.0.0/255.0.0.0
    no-route = 210.0.0.0/255.192.0.0
    no-route = 210.64.0.0/255.224.0.0
    no-route = 210.160.0.0/255.224.0.0
    no-route = 210.192.0.0/255.224.0.0
    no-route = 211.64.0.0/255.248.0.0
    no-route = 211.80.0.0/255.240.0.0
    no-route = 211.96.0.0/255.248.0.0
    no-route = 211.136.0.0/255.248.0.0
    no-route = 211.144.0.0/255.240.0.0
    no-route = 211.160.0.0/255.248.0.0
    no-route = 218.0.0.0/255.128.0.0
    no-route = 218.160.0.0/255.224.0.0
    no-route = 218.192.0.0/255.192.0.0
    no-route = 219.64.0.0/255.224.0.0
    no-route = 219.128.0.0/255.224.0.0
    no-route = 219.192.0.0/255.192.0.0
    no-route = 220.96.0.0/255.224.0.0
    no-route = 220.128.0.0/255.128.0.0
    no-route = 221.0.0.0/255.224.0.0
    no-route = 221.96.0.0/255.224.0.0
    no-route = 221.128.0.0/255.128.0.0
    no-route = 222.0.0.0/255.0.0.0
    no-route = 223.0.0.0/255.224.0.0
    no-route = 223.64.0.0/255.192.0.0
    no-route = 223.128.0.0/255.128.0.0
    Vicer
        19
    Vicer  
       2016-09-16 03:10:03 +08:00
    另外建议你用 ocserv 0.10.12 。
    很稳定。
    有好处。
    windhunter
        20
    windhunter  
    OP
       2016-09-16 16:09:33 +08:00
    @kkxxxxxxx @kozora 谢谢你们的提醒。我要解决的问题不在于 iOS 客户端,相反, iOS 上的 anyconnect 已经能满足我的需要了。是奇葩的 android 版 anyconnect 不能达到我的要求。
    @Vicer 感谢你提供的配置文件。下午有空试了一下,用你的配置文件依旧不行(只修改了认证方式、 ip 地址 和端口),不管是 openconnect 和 anyconnect 都不行。看来要试试给 ocserv 降级了。这个只能晚上回去弄了。再次感谢。
    wm5d8b
        21
    wm5d8b  
       2016-09-16 17:37:58 +08:00
    android 上的 openconnect 客户端是需要特殊配置吗?我试了几次,都是连上服务器后,什么网站都打不开。 anyconnect 就没有这个问题
    Aquamarine
        22
    Aquamarine  
       2016-09-16 18:42:23 +08:00
    据说安卓的 AC ,分流要靠服务端
    dreamtrail
        23
    dreamtrail  
       2016-09-16 22:50:38 +08:00
    我是用服务器做得分流,不管什么客户端连上去,效果都是一样的,缺点是要多消耗一点服务器流量
    hagha
        24
    hagha  
       2016-09-16 23:30:12 +08:00 via Android
    同安卓,折腾了好多方法都没成功
    itiger88
        25
    itiger88  
       2016-10-18 09:10:11 +08:00
    @Vicer 由于个人 CiscoAnyConnect 的目的是为了移动端更好更快的接受境外好友的 Whatsapp 信息,又分析不错那么多的 Wahtsapp 的服务器,所以得用 no-route 比较好。我也遇到了这个用 no-route 对安卓手机无效得情况:
    我的使用环境如下
    1.CentOS7 mini cd 安装版
    2.最新版本的 ocserv (centos7 yum install 安装的 ocserv-0.11.5-1.el7.x86_64 ),配置文件用的是网上找到的常用的 Centos7 一键脚本,采用默认的用户名密码认证方式
    3.手机是华为 mate8 安卓 6 ,没有 root 过
    4. 客户端软件是 Cisco AnyConnect 4.0.05057 (刚刚 google play 市场下载)或者 OpenConnect 1.11 (刚刚 google play 市场下载的)
    5.使用 Cisco AnyConnect 看日志根本没有自定义 route 表的生成,但是使用 OpenConnect 时看到有 route 表生成的日志,但是实际没有生效,访问 www.ip138.com 显示的是我国外 VPS 的 IP ,走的全局路由到 VPS 。
    ------个人怀疑是因为我的手机是华为 mate8 (安卓 6.0 版本) 没有 root 的原因,因此无法在安卓系统中生成路由表,有这个动作但是系统没生效到。

    我今天会继续测试下用证书方式看看能不能获得安卓手机的系统权限从而生成路由表。
    -----------------
    另外 Vicer 你能详细说下你在安卓下 no-route 表生效的环境吗?
    1.手机型号 /安卓版本号? 有没有 root ?
    2.服务器 VPS 的版本 是 CentOS 多少? 还是 Debian 几还是 Ubuntu 几?
    3.使用 ocserv 版本 0.10.12 和其他新版本有没有对比过?为啥你前文那么推崇?
    4.ocserv 0.10.12 是手工编译版吧?
    5.使用的证书文件是自己生成的还是第三方例如 Wosign / StarSSL/Letsencrypt 生成的?---我感觉这点很关键,很可能是这个证书导致安卓系统有权限修改系统路由表
    Vicer
        26
    Vicer  
       2016-10-18 09:30:13 +08:00 via Android
    1.Nexus 6 root
    2.Debian 7.0
    3.新版本,在 Debian7 上需要多安装很多东西。 0.10.12 是最后一个,不要那么多的,而且功能正常。稳定很久了。
    4.手工编译。
    5.AlphaSSL CA
    itiger88
        27
    itiger88  
       2016-10-18 09:55:31 +08:00
    @Vicer 那我无法做到和你的环境一模一样了,手机不想 root ,日后给同事用这个 vpn 也不能要求对方 root 呀。
    用电脑感觉这种 no-route 方式对我们来说是最好的,一上班电脑就拨好 vpn ,一般国内流量走国内,上 google 查资料 上 gmail 收邮件就走国外。

    而且我觉得 IkeV2 其实在国内来说,在移动端的兼容性不好:
    1. 各个市不同而不同,广州这边的移动 4G 会封 IkeV2 ( strongSwan )的认证,珠海移动也会封,但是肇庆移动不会封,感觉和各个市自己的基站出口设备设置有关系;
    2.中国电信的 3G 没有封 IkeV2.
    2. 同时各种宽频对 IkeV2 支持度不同,例如我家的 E 家宽( ip138.com 显示的中国电信出口)就不支持 IkeV2 的认证,导致家里 WiFi 不能用 IkeV2 ,但是支持 IkeV1 。我相信长城宽带这种也同样。但是单位的联通专线 /电信 100 兆企业光纤(虚拟拨号方式)就支持 IkeV2 。
    各种环境的变化,导致移动端使用的 vpn 会断来断去,必须人手切换不同的 vpn 连接方式, IkeV2 / IkeV1/PPTP/L2TP ,好麻烦,而且最重要的是家里的 E 家宽是会封 UDP 包传输,一旦发现有 UDP 传输到某个固定 IP 超过 3 分钟 40 秒,就会禁止访问这 VPS 的 IP 2 分钟,第二次发现而封 IP 的时间会更短。没法子只能使用纯 TCP 方式的 VPN 方式......我笔记本正常用的 OpenVPN 方式对移动端来说兼容性太差了(其实是没有移动端),试验了一段时间,最后下决心落实采用的是 ocserv 的纯 TCP 方式( 443 端口).......能加好友吗?多向你请教
    Vicer
        28
    Vicer  
       2016-10-18 10:43:11 +08:00 via Android
    @itiger88 你的这个问题,曾经遇到过,你需要的是一个国内的 DNS
    itiger88
        29
    itiger88  
       2016-10-18 14:32:41 +08:00
    @Vicer 你说的国内 DNS 是什么意思? 要自建一个没有受到污染而且返回国内网址比较快地址解释吗?

    刚刚我试过一个问题就是 无论是 采用 no-route 方式 还是 route 方式,拨号上去之后访问 www.163.com 都访问不了, 8.8.8.8 解释 www.163.comopthw.xdwscache.speedcdns.com [203.189.130.40]
    必须采用全局路由指向 VPS 的方式才能访问到 www.163.com 不知你会不会这样?
    而且在 ocserv 全局路由这种情况下,我在 IE 地址栏输入要访问的网址例如 www.taobao.com ,按了回车之后,浏览器足足要等 2-3 秒才会显示出内容(如果直接 ping 那网址不超过 100ms ),比不拨号时速度明显慢了,你会不会有这种现象?
    Vicer
        30
    Vicer  
       2016-10-18 16:21:21 +08:00 via Android
    @itiger88 我给你测试一下我搭建的。

    http://bbs.wfun.com/thread-953425-1-1.html
    Vicer
        31
    Vicer  
       2016-10-18 16:23:18 +08:00 via Android
    @itiger88 你把所有设置还原,直接用我的试试。
    ip.cnip138.com 或者 ipip.net
    Vicer
        32
    Vicer  
       2016-10-18 16:30:08 +08:00 via Android
    Vicer
        33
    Vicer  
       2016-10-18 17:34:17 +08:00 via Android
    @itiger88 测试完告诉我,是不是你理想中的那样
    itiger88
        34
    itiger88  
       2016-10-18 22:44:57 +08:00
    @Vicer 奇怪,我的华为 mate8 手机导入你的 https://free.vicer.xyz:6619/no-UserVPN.p12 报错,说安装失败,无法读取证书文件。 而该证书导入 win10 的就没问题,但是导入 win10 后用 CiscoAnyConnect 连接你的 2 个服务器都报错。 Connection attempt has failed 。 明天我回公司用公司网络再试下。
    itiger88
        35
    itiger88  
       2016-10-18 22:51:55 +08:00
    @Vicer 而且我电脑只能解释到 kms.vicer.xyz 为 138.128.217.164 ,解释不到 free.vicer.xyz
    itiger88
        36
    itiger88  
       2016-10-18 22:52:38 +08:00
    @Vicer 必须拨了 vpn 之后才能解释到 free.vicer.xyz [104.206.136.190]
    Vicer
        37
    Vicer  
       2016-10-18 23:43:54 +08:00 via Android
    @itiger88 android 用 OpenConnect,AnyConnect 会有这个问题,所以不推荐。难道我的域名被墙了?
    Vicer
        38
    Vicer  
       2016-10-18 23:44:59 +08:00 via Android
    @itiger88 PC 要用管理员权限运行,证书要导入到本地计算机。
    itiger88
        39
    itiger88  
       2016-10-19 12:36:19 +08:00
    @Vicer 我按照下面的做法导入证书对不对? 我的系统是 windows10 ( cn_windows_10_enterprise_version_1607_updated_jul_2016_x64_dvd_9057083.iso )没有之前版本 vpn 设置中修改不了默认路由那 bug 。

    第一步:下载你给的 CA 证书( no-UserVPN.p12 ),将证书存放在可以找到的任意位置,然后管理员权限运行命令"mmc"

    第二步:点击文件--添加或删除管理单元,在可用管理单元中选择“证书”,点击添加,再选择“计算机帐户”,再点“本地计算机” 和“完成”按钮,最后点击“确定”按钮。

    第三步:右键点击受信任的根证书颁发机构的证书--所有任务--导入,再点下一步,点击浏览选择在第一步中下载的证书文件,然后再点下一步,证书存储在“受信任的根证书颁发机构”,然后再点下一步完成。
    Vicer
        40
    Vicer  
       2016-10-19 13:40:42 +08:00 via Android
    不是直接双击?然后,选择导入本地计算机?删除证书需要到 MMC 里删除。
    AnyConnect 需要管理员权限运行,如果开机自启,先退出。
    Vicer
        41
    Vicer  
       2016-10-19 13:57:37 +08:00 via Android
    @itiger88 android 上,没有 root ,不会应用路由表,刚刚测试了。
    Vicer
        42
    Vicer  
       2016-10-19 14:18:52 +08:00 via Android
    @itiger88 不过在华为的电信机上,不 root ,也能分流
    Vicer
        43
    Vicer  
       2016-10-19 14:22:52 +08:00 via Android
    @itiger88 所以,安卓能不能分流,还要看具体机型 Rom
    itiger88
        44
    itiger88  
       2016-10-19 14:29:00 +08:00
    @Vicer 我一直都是用管理员权限运行 AnyConect 的。刚刚用公司联通的专线(广州)测试你的 2 个服务器,都能成功拨入,就是得直接双击导入.p12 证书文件(直接双击是导入到 MMC 的“证书”中的“本地计算机中”的“个人”,),之前上面的做法是我以前 IKEv2 证书的导入方式(导入到的是 MMC 中“证书”中的“本地计算机中”的“受信任的根证书颁发机构”),后者能拨号 IKEv2 ,但是不能拨号 ocserv 。。。
    刚刚困扰我半天自己服务器证书搭建后,用 win10+证书登录不上同样是这个原因,证书文件导入方式错误!
    当时 ocserv 报错为: Oct 19 14:07:09 xxxx ocserv[7783]: GnuTLS error (at worker-vpn.c:595): Error in the certificate.
    特此记录给有心搞证书登录的同好知道。

    另外 Vicer ,我现在是在香港阿里云上租用最便宜那款主机 8 美金 /月 /2T 流量 /30M 峰值带宽,打算给公司同事用,我后来改了 ocserv.conf 中的 DNS ,加入阿里云内部 10.x.x.x 的 DNS 地址,这个 DNS 没有被污染,而且解释国内网站比较好,比起 8.8.8.8 少了几十毫秒的延时呀(从 vps 过去 DNS 才 0.0x 毫秒), 使用 no-route 模式配置,电脑端用起来很好的体验效果, 163.com 等打开都很快(分别验证 www.ip138.combgp.he.net 成功显示不同 IP ),比起我昨天用别的地区的服务器测试好多了,真的是专门的到 VPS 最快的无污染的 DNS 比较好。

    等下有空继续测试证书方式下在安卓手机无 root 情况下能否支持 no-route 方式,网上有文说不行。如果不行再测试 custom-header = "X-CSTP-Split-Exclude:123.58.180.0/255.255.255.0" 这种别的文章提到的方式
    itiger88
        45
    itiger88  
       2016-10-19 15:32:00 +08:00
    @Vicer 华为 mate8 手机导入你的 https://free.vicer.xyz:6619/no-UserVPN.p12 报错,文件管理器点击安装,报“安装失败,无法读取证书文件”。 而该证书导入 win10 的就没问题,而我中午自己生成的证书文件 .p12 也导入不进我的安卓手机,这是什么原因呢? 你有没有试过,还是直接在 OpenConnect 1.11 指定这证书文件就好?
    itiger88
        46
    itiger88  
       2016-10-19 18:24:35 +08:00
    @Vicer 上网查了一番,终于成功在手机导入证书了,在 2 个软件界面各自不同的地方导入法。现在利用你给的测试 vpn 地址测试过,我的手机没 root 的情况下真的不支持 no route 指令。明天测试下 custom-header 看行不!
    jemyzhang
        47
    jemyzhang  
       2017-10-23 23:31:45 +08:00
    试了一下,ios 完美自动 pac,android 不行,可惜了
    iutopia
        48
    iutopia  
       2018-01-02 11:31:16 +08:00
    我还在想 ios 和 mac 下的全部都走 vpn 呢,他就自动分流了,
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3217 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 31ms UTC 11:31 PVG 19:31 LAX 03:31 JFK 06:31
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86