diff --git a/server/src/routes/proxy.ts b/server/src/routes/proxy.ts index 5289015c..f083ce09 100644 --- a/server/src/routes/proxy.ts +++ b/server/src/routes/proxy.ts @@ -3,6 +3,7 @@ import { chromium } from "playwright"; import User from '../models/User'; import { encrypt, decrypt } from '../utils/auth'; import { requireSignIn } from '../middlewares/auth'; +import { configureProxy } from 'maxun-core'; export const router = Router(); @@ -160,7 +161,7 @@ const maskProxyUrl = (url: string) => { // TODO: Move this from here export const getDecryptedProxyConfig = async (userId: string) => { const user = await User.findByPk(userId, { - attributes: ['proxy_url', 'proxy_username', 'proxy_password'], + raw: true, }); if (!user) { @@ -171,6 +172,8 @@ export const getDecryptedProxyConfig = async (userId: string) => { const decryptedProxyUsername = user.proxy_username ? decrypt(user.proxy_username) : null; const decryptedProxyPassword = user.proxy_password ? decrypt(user.proxy_password) : null; + console.log(`Decrypting ${decryptedProxyUrl}, ${decryptedProxyUsername}, ${decryptedProxyPassword}`); + return { proxy_url: decryptedProxyUrl, proxy_username: decryptedProxyUsername,