electron-session-proxy
v1.0.2
Published
ππ A socks proxy with user authentication can be set for electron's session
Maintainers
Readme
ππ A socks proxy with user authentication can be set for electron's session
Install
# NPM
npm install electron-session-proxy
# Yarn
yarn add electron-session-proxy
# PNPM
pnpm add electron-session-proxyBefore use
import { session } from "electron";
const ses = session.fromPartition("persist:github");
// proxy is invalid ββ Unable to authenticate
ses.setProxy({ proxyRules: "socks5://user:[email protected]:1080" });After use
import { session } from "electron";
import { sockProxyRules } from "electron-session-proxy";
const ses = session.fromPartition("persist:github");
// proxyRules === 'http://127.0.0.1:[random-port]'
const proxyRules = await sockProxyRules("socks5://user:[email protected]:1080");
// proxy is valid β
β
Able to authenticate
ses.setProxy({ proxyRules });Thanks
Thanks to the socks( GitHub | npm ) project, it has been a huge help to me.
