Closed baltpeter closed 1 year ago
Looks like the problem is with the addon paths, here's how mitmdump is being started:
spawnargs: [
'mitmdump',
'--mode',
'wireguard',
'-s',
'/mitmproxy-addons/ipcEventsAddon.py',
'-s',
'/mitmproxy-addons/har_dump.py',
'--set',
'hardump=/tmp/eccc1a6e7038edc0866afb0b15bfc19b.har',
'--set',
'ipcPipeFd=3'
]
_dirname
is /src
.
In the bundle, const __dirname = dirname(fileURLToPath(import.meta.url));
was turned into const __dirname = (0, $hgUW1$dirname)((0, $hgUW1$fileURLToPath)("file:///src/index.ts"));
.
That's by design, apparently: https://parceljs.org/languages/javascript/#import.meta
We'll just use https://www.npmjs.com/package/cross-dirname instead.
I just did
yarn add cyanoacrylate
and then ran the example from the README:This gave me the following error:
Even though I got no output from yarn, a venv was created and it looks like mitmproxy was installed: