From 4533acaaa862c3122688815738b3db5b99f6b938 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 5 Aug 2019 14:15:12 -0400 Subject: [PATCH] wip create proxy module --- .../embark-blockchain-process/package.json | 7 -- .../src/blockchain.js | 41 +--------- .../embark-blockchain-process/src/index.js | 3 +- .../src/simulator.js | 11 +-- .../embark-blockchain-process/src/utils.js | 57 -------------- packages/embark-core/index.d.ts | 3 + packages/embark-proxy/.npmrc | 4 + packages/embark-proxy/README.md | 6 ++ packages/embark-proxy/package.json | 74 +++++++++++++++++++ .../src/httpProxyOverride.js | 0 packages/embark-proxy/src/index.ts | 72 ++++++++++++++++++ .../src/proxy.js | 3 +- packages/embark-proxy/tsconfig.json | 5 ++ packages/embark-proxy/tslint.json | 3 + packages/embark-typings/src/embark.d.ts | 17 +++++ packages/embark-utils/index.d.ts | 13 +++- packages/embark-utils/src/index.js | 3 +- packages/embark-utils/src/network.ts | 58 +++++++++++++++ packages/embark/package.json | 1 + packages/embark/src/lib/core/engine.js | 1 + 20 files changed, 261 insertions(+), 121 deletions(-) delete mode 100644 packages/embark-blockchain-process/src/utils.js create mode 100644 packages/embark-proxy/.npmrc create mode 100644 packages/embark-proxy/README.md create mode 100644 packages/embark-proxy/package.json rename packages/{embark-blockchain-process => embark-proxy}/src/httpProxyOverride.js (100%) create mode 100644 packages/embark-proxy/src/index.ts rename packages/{embark-blockchain-process => embark-proxy}/src/proxy.js (99%) create mode 100644 packages/embark-proxy/tsconfig.json create mode 100644 packages/embark-proxy/tslint.json diff --git a/packages/embark-blockchain-process/package.json b/packages/embark-blockchain-process/package.json index b3472e966..cd99f35fc 100644 --- a/packages/embark-blockchain-process/package.json +++ b/packages/embark-blockchain-process/package.json @@ -52,18 +52,11 @@ "embark-i18n": "^4.1.0-beta.3", "embark-logger": "^4.1.0-beta.5", "embark-utils": "^4.1.0-beta.5", - "ethereumjs-tx": "1.3.7", - "ethereumjs-util": "6.0.0", "fs-extra": "7.0.1", - "http-proxy": "1.17.0", "netcat": "1.3.5", - "node-http-proxy-json": "0.1.6", "pkg-up": "2.0.0", - "pump": "3.0.0", "semver": "5.6.0", "shelljs": "0.8.3", - "simples": "0.8.8", - "stream-json": "1.1.3", "ws": "6.1.2" }, "devDependencies": { diff --git a/packages/embark-blockchain-process/src/blockchain.js b/packages/embark-blockchain-process/src/blockchain.js index 29bf5088d..731a6d320 100644 --- a/packages/embark-blockchain-process/src/blockchain.js +++ b/packages/embark-blockchain-process/src/blockchain.js @@ -6,10 +6,9 @@ const path = require('path'); const constants = require('embark-core/constants'); const GethClient = require('./gethClient.js'); const ParityClient = require('./parityClient.js'); -import { Proxy } from './proxy'; import { IPC } from 'embark-core'; -import { compact, dappPath, defaultHost, dockerHostSwap, embarkPath, AccountParser} from 'embark-utils'; +import { compact, dappPath, defaultHost, dockerHostSwap, embarkPath} from 'embark-utils'; const Logger = require('embark-logger'); // time between IPC connection attempts (in ms) @@ -24,7 +23,6 @@ var Blockchain = function(userConfig, clientClass) { this.onExitCallback = userConfig.onExitCallback; this.logger = userConfig.logger || new Logger({logLevel: 'debug', context: constants.contexts.blockchain}); // do not pass in events as we don't want any log events emitted this.events = userConfig.events; - this.proxyIpc = null; this.isStandalone = userConfig.isStandalone; this.certOptions = userConfig.certOptions; @@ -60,8 +58,7 @@ var Blockchain = function(userConfig, clientClass) { vmdebug: this.userConfig.vmdebug || false, targetGasLimit: this.userConfig.targetGasLimit || false, syncMode: this.userConfig.syncMode || this.userConfig.syncmode, - verbosity: this.userConfig.verbosity, - proxy: this.userConfig.proxy + verbosity: this.userConfig.verbosity }; this.devFunds = null; @@ -103,7 +100,6 @@ var Blockchain = function(userConfig, clientClass) { this.logger.error(__(spaceMessage, 'genesisBlock')); process.exit(1); } - this.initProxy(); this.client = new clientClass({config: this.config, env: this.env, isDev: this.isDev}); this.initStandaloneProcess(); @@ -153,35 +149,6 @@ Blockchain.prototype.initStandaloneProcess = function () { } }; -Blockchain.prototype.initProxy = function () { - if (this.config.proxy) { - this.config.rpcPort += constants.blockchain.servicePortOnProxy; - this.config.wsPort += constants.blockchain.servicePortOnProxy; - } -}; - -Blockchain.prototype.setupProxy = async function () { - if (!this.proxyIpc) this.proxyIpc = new IPC({ipcRole: 'client'}); - - const addresses = AccountParser.parseAccountsConfig(this.userConfig.accounts, false, dappPath(), this.logger); - - let wsProxy; - if (this.config.wsRPC) { - wsProxy = new Proxy(this.proxyIpc).serve(this.config.wsHost, this.config.wsPort, true, this.config.wsOrigins, addresses, this.certOptions); - } - - [this.rpcProxy, this.wsProxy] = await Promise.all([new Proxy(this.proxyIpc).serve(this.config.rpcHost, this.config.rpcPort, false, null, addresses, this.certOptions), wsProxy]); -}; - -Blockchain.prototype.shutdownProxy = function () { - if (!this.config.proxy) { - return; - } - - if (this.rpcProxy) this.rpcProxy.close(); - if (this.wsProxy) this.wsProxy.close(); -}; - Blockchain.prototype.runCommand = function (cmd, options, callback) { this.logger.info(__("running: %s", cmd.underline).green); if (this.config.silent) { @@ -257,9 +224,6 @@ Blockchain.prototype.run = function () { data = data.toString(); if (!self.readyCalled && self.client.isReady(data)) { self.readyCalled = true; - if (self.config.proxy) { - await self.setupProxy(); - } self.readyCallback(); } self.logger.info(`${self.client.name}: ${data}`); @@ -297,7 +261,6 @@ Blockchain.prototype.readyCallback = function () { }; Blockchain.prototype.kill = function () { - this.shutdownProxy(); if (this.child) { this.child.kill(); } diff --git a/packages/embark-blockchain-process/src/index.js b/packages/embark-blockchain-process/src/index.js index 80d07f925..9dbf5e83e 100644 --- a/packages/embark-blockchain-process/src/index.js +++ b/packages/embark-blockchain-process/src/index.js @@ -3,11 +3,10 @@ const async = require('async'); const { normalizeInput, deconstructUrl } = require('embark-utils'); const constants = require('embark-core/constants'); import { BlockchainProcessLauncher } from './blockchainProcessLauncher'; -import { pingEndpoint } from './utils'; +import {pingEndpoint} from 'embark-utils'; export { BlockchainClient } from './blockchain'; export { Simulator } from './simulator'; -export { Proxy } from './proxy'; export default class BlockchainModule { diff --git a/packages/embark-blockchain-process/src/simulator.js b/packages/embark-blockchain-process/src/simulator.js index ce6927f32..8193077a7 100644 --- a/packages/embark-blockchain-process/src/simulator.js +++ b/packages/embark-blockchain-process/src/simulator.js @@ -1,7 +1,6 @@ const path = require('path'); const pkgUp = require('pkg-up'); let shelljs = require('shelljs'); -import { Proxy } from './proxy'; import { IPC } from 'embark-core'; const constants = require('embark-core/constants'); import { AccountParser, dappPath, defaultHost, dockerHostSwap, embarkPath, deconstructUrl } from 'embark-utils'; @@ -17,6 +16,7 @@ export class Simulator { run(options) { let cmds = []; + // TODO change this probably let useProxy = this.blockchainConfig.proxy || false; let {host, port} = deconstructUrl(this.blockchainConfig.endpoint); host = (dockerHostSwap(options.host || host) || defaultHost); @@ -82,14 +82,5 @@ export class Simulator { console.log(`running: ${programName} ${cmds.join(' ')}`); shelljs.exec(`node ${program} ${cmds.join(' ')}`, {async : true}); - - if(useProxy){ - let ipcObject = new IPC({ipcRole: 'client'}); - if (this.blockchainConfig.wsRPC) { - return new Proxy(ipcObject).serve(host, port, true, this.blockchainConfig.wsOrigins, []); - } - - new Proxy(ipcObject).serve(host, port, false); - } } } diff --git a/packages/embark-blockchain-process/src/utils.js b/packages/embark-blockchain-process/src/utils.js deleted file mode 100644 index 76e6e5ad0..000000000 --- a/packages/embark-blockchain-process/src/utils.js +++ /dev/null @@ -1,57 +0,0 @@ -export function pingEndpoint(host, port, type, protocol, origin, callback) { - // remove any extra information from a host string, e.g. port, path, query - const _host = require("url").parse( - // url.parse() expects a protocol segment else it won't parse as desired - host.slice(0, 4) === "http" ? host : `${protocol}://${host}` - ).hostname; - - let closed = false; - const close = (req, closeMethod) => { - if (!closed) { - closed = true; - req[closeMethod](); - } - }; - - const handleEvent = (req, closeMethod, ...args) => { - close(req, closeMethod); - setImmediate(() => { callback(...args); }); - }; - - const handleError = (req, closeMethod) => { - req.on("error", (err) => { - if (err.code !== "ECONNREFUSED") { - console.error( - `Ping: Network error` + - (err.message ? ` '${err.message}'` : "") + - (err.code ? ` (code: ${err.code})` : "") - ); - } - // when closed additional error events will not callback - if (!closed) { handleEvent(req, closeMethod, err); } - }); - }; - - const handleSuccess = (req, closeMethod, event) => { - req.once(event, () => { - handleEvent(req, closeMethod); - }); - }; - - const handleRequest = (req, closeMethod, event) => { - handleError(req, closeMethod); - handleSuccess(req, closeMethod, event); - }; - - if (type === "ws") { - const url = `${protocol === "https" ? "wss" : "ws"}://${_host}:${port}/`; - const req = new (require("ws"))(url, origin ? {origin} : {}); - handleRequest(req, "close", "open"); - } else { - const headers = origin ? {Origin: origin} : {}; - const req = (protocol === "https" ? require("https") : require("http")).get( - {headers, host: _host, port} - ); - handleRequest(req, "abort", "response"); - } -} diff --git a/packages/embark-core/index.d.ts b/packages/embark-core/index.d.ts index 7d0f3d77e..235f4e7b4 100644 --- a/packages/embark-core/index.d.ts +++ b/packages/embark-core/index.d.ts @@ -1,2 +1,5 @@ declare module "embark-core" { + export class IPC { + constructor(options: {ipcRole: string}); + } } diff --git a/packages/embark-proxy/.npmrc b/packages/embark-proxy/.npmrc new file mode 100644 index 000000000..e031d3432 --- /dev/null +++ b/packages/embark-proxy/.npmrc @@ -0,0 +1,4 @@ +engine-strict = true +package-lock = false +save-exact = true +scripts-prepend-node-path = true diff --git a/packages/embark-proxy/README.md b/packages/embark-proxy/README.md new file mode 100644 index 000000000..6ba8cb5c6 --- /dev/null +++ b/packages/embark-proxy/README.md @@ -0,0 +1,6 @@ +# `embark-proxy` + +Proxy to listen to blockchain requests and responses + +Visit [embark.status.im](https://embark.status.im/) to get started with +[Embark](https://github.com/embark-framework/embark). diff --git a/packages/embark-proxy/package.json b/packages/embark-proxy/package.json new file mode 100644 index 000000000..1f158dfc7 --- /dev/null +++ b/packages/embark-proxy/package.json @@ -0,0 +1,74 @@ +{ + "name": "embark-proxy", + "version": "4.1.0-beta.5", + "author": "Iuri Matias ", + "contributors": [], + "description": "Proxy to listen to blockchain requests and responses", + "homepage": "https://github.com/embark-framework/embark/tree/master/packages/embark-proxy#readme", + "bugs": "https://github.com/embark-framework/embark/issues", + "keywords": [ + "blockchain", + "dapps", + "ethereum", + "ipfs", + "serverless", + "solc", + "solidity" + ], + "files": [ + "dist" + ], + "license": "MIT", + "repository": { + "directory": "packages/embark-proxy", + "type": "git", + "url": "https://github.com/embark-framework/embark.git" + }, + "main": "./dist/index.js", + "scripts": { + "build": "cross-env BABEL_ENV=node babel src --extensions \".ts\" --out-dir dist --root-mode upward --source-maps", + "ci": "npm run qa", + "clean": "npm run reset", + "lint": "npm-run-all lint:*", + "lint:ts": "tslint -c tslint.json \"src/**/*.ts\"", + "package": "npm pack", + "qa": "npm-run-all lint typecheck build package", + "reset": "npx rimraf dist embark-*.tgz package", + "start": "npm run watch", + "typecheck": "tsc", + "watch": "run-p watch:*", + "watch:build": "npm run build -- --verbose --watch", + "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" + }, + "eslintConfig": { + "extends": "../../.eslintrc.json" + }, + "dependencies": { + "@babel/runtime-corejs2": "7.3.1", + "embark-core": "^4.1.0-beta.5", + "embark-i18n": "^4.1.0-beta.3", + "embark-utils": "^4.1.0-beta.5", + "ethereumjs-tx": "1.3.7", + "ethereumjs-util": "6.0.0", + "http-proxy": "1.17.0", + "node-http-proxy-json": "0.1.6", + "pump": "3.0.0", + "stream-json": "1.1.3", + "simples": "0.8.8" + }, + "devDependencies": { + "@babel/cli": "7.2.3", + "@babel/core": "7.2.2", + "cross-env": "5.2.0", + "eslint": "5.7.0", + "npm-run-all": "4.1.5", + "rimraf": "2.6.3", + "tslint": "5.16.0", + "typescript": "3.4.5" + }, + "engines": { + "node": ">=8.12.0 <12.0.0", + "npm": ">=6.4.1", + "yarn": ">=1.12.3" + } +} diff --git a/packages/embark-blockchain-process/src/httpProxyOverride.js b/packages/embark-proxy/src/httpProxyOverride.js similarity index 100% rename from packages/embark-blockchain-process/src/httpProxyOverride.js rename to packages/embark-proxy/src/httpProxyOverride.js diff --git a/packages/embark-proxy/src/index.ts b/packages/embark-proxy/src/index.ts new file mode 100644 index 000000000..c66f39cc5 --- /dev/null +++ b/packages/embark-proxy/src/index.ts @@ -0,0 +1,72 @@ +import {Embark, Events, Logger} /* supplied by @types/embark in packages/embark-typings */ from "embark"; +import {IPC} from "embark-core"; +import {AccountParser, dappPath} from "embark-utils"; +import {Proxy} from "./proxy"; + +const constants = require("embark-core/constants"); + +export default class ProxyManager { + private logger: Logger; + private events: Events; + private proxyIpc: IPC; + private rpcProxy: any; + private wsProxy: any; + // private rpcPort: number; + // private wsPort: number; + + constructor(private embark: Embark, _options: any) { + console.log("ALLO"); + this.logger = embark.logger; + this.events = embark.events; + this.proxyIpc = new IPC({ipcRole: "client"}); + + this.embark.config.blockchainConfig.rpcPort += constants.blockchain.servicePortOnProxy; + this.embark.config.blockchainConfig.wsPort += constants.blockchain.servicePortOnProxy; + + this.events.once("blockchain:ready", () => { + console.log("SETUP"); + this.setupProxy(); + }); + } + + private async setupProxy() { + if (this.embark.config.blockchainConfig.proxy) { + return; + } + const addresses = AccountParser.parseAccountsConfig(this.embark.config.blockchainConfig.accounts, false, dappPath(), this.logger); + + let wsProxy; + if (this.embark.config.blockchainConfig.wsRPC) { + wsProxy = new Proxy(this.proxyIpc).serve( + this.embark.config.blockchainConfig.wsHost, + this.embark.config.blockchainConfig.wsPort, + true, this.embark.config.blockchainConfig.wsOrigins, + addresses, + this.embark.config.webServerConfig.certOptions); + } + + [this.rpcProxy, this.wsProxy] = await Promise.all([ + new Proxy(this.proxyIpc).serve( + this.embark.config.blockchainConfig.rpcHost, + this.embark.config.blockchainConfig.rpcPort, + false, + null, + addresses, + this.embark.config.webServerConfig.certOptions), + wsProxy, + ]); + } + + public shutdownProxy() { + if (!this.embark.config.blockchainConfig.proxy) { + return; + } + + if (this.rpcProxy) { + this.rpcProxy.close(); + } + if (this.wsProxy) { + this.wsProxy.close(); + } + } +} diff --git a/packages/embark-blockchain-process/src/proxy.js b/packages/embark-proxy/src/proxy.js similarity index 99% rename from packages/embark-blockchain-process/src/proxy.js rename to packages/embark-proxy/src/proxy.js index 6e2c70128..cc7b44553 100644 --- a/packages/embark-blockchain-process/src/proxy.js +++ b/packages/embark-proxy/src/proxy.js @@ -3,7 +3,7 @@ require('./httpProxyOverride'); const Asm = require('stream-json/Assembler'); import { __ } from 'embark-i18n'; -import { canonicalHost, timer } from 'embark-utils'; +import { canonicalHost, timer, pingEndpoint } from 'embark-utils'; const constants = require('embark-core/constants'); const {Duplex} = require('stream'); const http = require('http'); @@ -15,7 +15,6 @@ const WsWrapper = require('simples/lib/ws/wrapper'); const modifyResponse = require('node-http-proxy-json'); const Transaction = require('ethereumjs-tx'); const ethUtil = require('ethereumjs-util'); -import { pingEndpoint } from './utils'; const METHODS_TO_MODIFY = {accounts: 'eth_accounts'}; const REQUEST_TIMEOUT = 5000; diff --git a/packages/embark-proxy/tsconfig.json b/packages/embark-proxy/tsconfig.json new file mode 100644 index 000000000..5098b3cc4 --- /dev/null +++ b/packages/embark-proxy/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { "baseUrl": ".", "paths": { "*": ["types/*"] } }, + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark-proxy/tslint.json b/packages/embark-proxy/tslint.json new file mode 100644 index 000000000..0946f2096 --- /dev/null +++ b/packages/embark-proxy/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tslint.json" +} diff --git a/packages/embark-typings/src/embark.d.ts b/packages/embark-typings/src/embark.d.ts index a135bd0b9..a2c7198a9 100644 --- a/packages/embark-typings/src/embark.d.ts +++ b/packages/embark-typings/src/embark.d.ts @@ -24,6 +24,23 @@ export interface Config { }; generationDir: string; }; + blockchainConfig: { + accounts: any[]; + proxy: boolean; + rpcPort: string | number; + wsPort: string | number; + rpcHost: string | number; + wsHost: string | number; + wsOrigins: string; + rpcCorsDomain: string; + wsRPC: boolean; + }; + webServerConfig: { + certOptions: { + key: string; + cert: string; + }; + }; plugins: Plugins; reloadConfig(): void; } diff --git a/packages/embark-utils/index.d.ts b/packages/embark-utils/index.d.ts index 6a1d36759..6d2e1d8f5 100644 --- a/packages/embark-utils/index.d.ts +++ b/packages/embark-utils/index.d.ts @@ -1,8 +1,10 @@ declare module "embark-utils" { - class File { - path: string; + import {Logger} from "embark"; + + export class File { + public path: string; constructor(options: any); - prepareForCompilation(isCoverage?: boolean): any; + public prepareForCompilation(isCoverage?: boolean): any; } function anchoredValue(anchor: string|null, value: string): string; @@ -23,4 +25,9 @@ declare module "embark-utils" { function recursiveMerge(target: any, source: any): any; function pkgPath(...names: string[]): string; function removePureView(dir: string): void; + function pingEndpoint(host: string, port: number, type: string, protocol: string, origin: string, callback: any): void; + + export class AccountParser { + public static parseAccountsConfig(accountsConfig: any[], web3: any, dappPath: string, logger: Logger, nodeAccounts?: any[]): any[]; + } } diff --git a/packages/embark-utils/src/index.js b/packages/embark-utils/src/index.js index efc9249ba..aba732c82 100644 --- a/packages/embark-utils/src/index.js +++ b/packages/embark-utils/src/index.js @@ -4,7 +4,7 @@ const shelljs = require('shelljs'); const clipboardy = require('clipboardy'); const {canonicalHost, defaultCorsHost, defaultHost, dockerHostSwap, isDocker} = require('./host'); -const {downloadFile, findNextPort, getJson, httpGet, httpsGet, httpGetJson, httpsGetJson} = require('./network'); +const {downloadFile, findNextPort, getJson, httpGet, httpsGet, httpGetJson, httpsGetJson, pingEndpoint} = require('./network'); const logUtils = require('./log-utils'); const toposortGraph = require('./toposort'); import { unitRegex } from './constants'; @@ -321,6 +321,7 @@ const Utils = { httpsGet, httpGetJson, httpsGetJson, + pingEndpoint, setUpEnv, sha512, sha3, diff --git a/packages/embark-utils/src/network.ts b/packages/embark-utils/src/network.ts index d67ca58d4..544b0087b 100644 --- a/packages/embark-utils/src/network.ts +++ b/packages/embark-utils/src/network.ts @@ -91,3 +91,61 @@ export function getJson(url: string, cb: any) { } httpGetJson(url, cb); } + +export function pingEndpoint(host: string, port: number, type: string, protocol: string, origin: string, callback: any) { + // remove any extra information from a host string, e.g. port, path, query + const _host = require("url").parse( + // url.parse() expects a protocol segment else it won't parse as desired + host.slice(0, 4) === "http" ? host : `${protocol}://${host}`, + ).hostname; + + let closed = false; + const close = (req: any, closeMethod: any) => { + if (!closed) { + closed = true; + req[closeMethod](); + } + }; + + const handleEvent = (req: any, closeMethod: any, ...args: any) => { + close(req, closeMethod); + setImmediate(() => { callback(...args); }); + }; + + const handleError = (req: any, closeMethod: any) => { + req.on("error", (err: any) => { + if (err.code !== "ECONNREFUSED") { + console.error( + `Ping: Network error` + + (err.message ? ` '${err.message}'` : "") + + (err.code ? ` (code: ${err.code})` : ""), + ); + } + // when closed additional error events will not callback + if (!closed) { handleEvent(req, closeMethod, err); } + }); + }; + + const handleSuccess = (req: any, closeMethod: any, event: any) => { + req.once(event, () => { + handleEvent(req, closeMethod); + }); + }; + + const handleRequest = (req: any, closeMethod: any, event: any) => { + handleError(req, closeMethod); + handleSuccess(req, closeMethod, event); + }; + + if (type === "ws") { + const url = `${protocol === "https" ? "wss" : "ws"}://${_host}:${port}/`; + const req = new (require("ws"))(url, origin ? {origin} : {}); + handleRequest(req, "close", "open"); + } else { + const headers = origin ? {Origin: origin} : {}; + const req = (protocol === "https" ? require("https") : require("http")).get( + {headers, host: _host, port}, + ); + handleRequest(req, "abort", "response"); + } +} diff --git a/packages/embark/package.json b/packages/embark/package.json index 94081ac1f..d8450f60c 100644 --- a/packages/embark/package.json +++ b/packages/embark/package.json @@ -116,6 +116,7 @@ "embark-plugin-cmd": "^4.1.0-beta.5", "embark-process-logs-api": "^4.1.0-beta.5", "embark-profiler": "^4.1.0-beta.3", + "embark-proxy": "^4.1.0-beta.5", "embark-reset": "^4.1.0-beta.3", "embark-scaffolding": "^4.1.0-beta.5", "embark-solidity": "^4.1.0-beta.5", diff --git a/packages/embark/src/lib/core/engine.js b/packages/embark/src/lib/core/engine.js index 789f0bd21..9cad47607 100644 --- a/packages/embark/src/lib/core/engine.js +++ b/packages/embark/src/lib/core/engine.js @@ -204,6 +204,7 @@ class Engine { // }); this.registerModule('ethereum-blockchain-client'); + this.registerModulePackage('embark-proxy'); // this.registerModule('web3', { plugins: this.plugins }); this.registerModulePackage('embark-web3', {plugins: this.plugins}); this.registerModulePackage('embark-specialconfigs', {plugins: this.plugins});