javascript-obfuscator / javascript-obfuscator/webpack-obfuscator
using electron outside of /main.js
- 主要语言
- TypeScript
- 星标
- 928
- 派生
- 92
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently obfuscating my electron app using webpack-obfuscator - my config file is as follows:
**// webpack.config.js
'use strict';
const nodeExternals = require('webpack-node-externals');
const path = require('path'),
Obfuscate = require('webpack-obfuscator');
// const ObfuscateOption = require('../obfuscation_config.js');
module.exports = {
entry: {
electron: './main.js',
script: './scripts/index.js',
},
output: {
path: path.resolve(__dirname, '..', 'build'),
filename: '[name].js', // output: abc.js, cde.js
},
target: 'electron-main',
plugins: [
new Obfuscate({
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: false,
identifierNamesGenerator: 'hexadecimal',
log: false,
numbersToExpressions: true,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
simplify: true,
splitStrings: true,
splitStringsChunkLength: 10,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayWrappersCount: 2,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersType: 'variable',
stringArrayThreshold: 0.75,
/*transformObjectKeys: true,*/
unicodeEscapeSequence: false,
}),
],
externals: [nodeExternals({ modulesFromFile: true })],
};
**
however, i now need to use the electron net api in another file, not in the /build folder the obfuscation creates -
how would i go about this? thanks
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 webpack.config.js 开始,将 main.js 中的 Electron 入口与 scripts/index.js 以及 build 中生成的文件进行比较。检查 webpack-obfuscator 配置如何处理在打包输出之外使用 Electron 的 net API 的代码。完成标准是记录一种受支持的配置,或解释所需的文件放置位置和构建行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- electron, javascript, webpack
- 领域
- build-system, desktop
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100