工行网银, Silverlight, 支付宝控件, 放开那个 Windows 虚拟机, 让 Wine 上吧~

无图无真相:

2014-02-20-183618_1044x559-300x160  2014-02-20-183809_986x553-300x168

基本的原理是, 利用 Chrome 里已有的 npactivex (ActiveX for Chrome) 扩展, 配合 pipelight 提供的 npactivex NPAPI 插件, 将 ActiveX 控件本身用 wine 执行, 并且无缝地嵌入 Chrome 网页中.

因为此功能依然在活跃开发中 (今年 FOSDEM 2014 的一个碰撞产生的火花神马的), 稳定版本的 pipelight 暂时没有加入此功能. 大家如果想尝鲜的话, 我下面介绍一下 Arch Linux 里的安装测试方法 (暂时只针对 64 位测试用户哈):

1. 安装源里的 mingw-w64 组, 全选安装

2. 安装 AUR/pipelight-git, 需要修改 PKGBUILD 的一些部分:

- 删除依赖 mingw-w32-bin

- 在 ./configure 这一行末尾添加 –win32-static

3. 完成安装, pipelight-git 的 wine-browser-installer 和 wine-silverlight 两个依赖也来自 AUR.

4. 解锁 pipelight 的 npactivex 插件:

sudo pipelight-plugin –unlock npactivex

看到 “Plugin npactivex is now unlocked” 即为解锁成功.

5. 启用 npactivex 插件

sudo pipelight-plugin –enable npactivex

看到 “Plugin npactivex is now enabled” 即为解锁成功.

6. 启动 chrome 浏览器,打开 chrome://plugins, 应该可以看到以下内容:

ActiveX hosting plugin for NPAPI

ActiveX hosting plugin for NPAPI r37

Name: ActiveX hosting plugin for NPAPI

Description: ActiveX hosting plugin for NPAPI r37

Version:

Location: /usr/lib/pipelight/libpipelight-npactivex.so

Type: NPAPI

Disable

MIME types:

MIME type Description File extensions

application/x-itst-activex ActiveX (*.ocx)

.ocx

application/activex-manager ActiveXManager

如果看到下列错误:

Pipelight Error (npactivex)!

Something went wrong, check the terminal output

请从终端打开 chromium/google-chrome, 观察终端出错日志.

7. 安装需要的 ActiveX 控件. 下面以工行控件为例:

7.1. 下载工行网银控件安装包:

wget http://www.icbc.com.cn/icbc/html/download/dkq/icbc_netbank_client_controls.exe

7.2. 安装 mfc42 运行库:

WINEPREFIX=~/.wine-pipelight winetricks -q mfc42

7.3. 安装:

WINEPREFIX=~/.wine-pipelight wine icbc_netbank_client_controls.exe

故障排除: 运行

WINEPREFIX=~/.wine-pipelight wine uninstaller –list

如果输出包含以下内容就说明安装成功了, 否则说明以上某一步出错了

{93156467-FD99-4A30-9CA5-8563F4BB8DB3}|||icbc_netbank_client_controls

8. 安装 np-activex extension:

扩展可以从 Chrome Web Store 直接安装, 地址: https://chrome.google.com/webstore/detail/activex-for-chrome/lgllffgicojgllpmdbemgglaponefajn/related (打不开请翻墙哦 :D )

9. 设置 np-activex extension:

打开 chrome://chrome/extensions, 点击 “ActiveX for Chrome” 旁边的 “选项” (Options), 浏览到 “ICBC工商银行” 所在的条目, 将”已禁用”改为”已启用”.

10. 用 Chrome 打开 https://mybank.icbc.com.cn/icbc/perbank/index.jsp 应该可以正常登陆工行网银了 :D

支付宝控件的安装过程基本一样 (注意不要漏掉设置 WINEPREFIX 哦), 不过在 npactivex extension 的设置界面并没有 Alipay 的选项. 分享一下我测试成功的规则哈:

Mode: WildChar

Pattern: https://*.alipay.com/*

User Agent: MSIE9

Other helper scripts: dynamic ieevent

最后, 感谢 Pipelight 项目. Pipelight 项目是两位德国的大学生发起的项目, 因最初目标是在浏览器里无缝支持 Silverlight 而得名. 如果你愿意表达对他们的感谢, 可以到以下链接为他们赠送 kudo:

https://www.ohloh.net/p/pipelight/contributors/3052248574201504

https://www.ohloh.net/p/pipelight/contributors/3052248574201570

附安装 -git 版本的旧方法:

1. 安装源里的 mingw-w64 组, 全选安装

2. 安装 AUR/pipelight-git, 需要修改 PKGBUILD 的一些部分:
- 删除依赖 mingw-w32-bin
- 在 ./configure 这一行末尾添加 –win32-static

3. 完成安装, pipelight-git 的 wine-browser-installer 和 wine-silverlight 两个依赖也来自 AUR.


GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:22 天前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐