From 8eaf78e39ead96efb3003dd35c0048b9da0c5a41 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 26 Aug 2025 22:19:32 +0000
Subject: [PATCH] feat: Remove Bright Data account dependency
This change modifies the application to allow it to run without a
Bright Data account.
The login and authentication process, which previously required
credentials for Bright Data's service, has been bypassed. The
application now simulates a successful local login, allowing users
to access the proxy manager's core features without needing to
connect to an external service.
Key changes include:
- Bypassing the login UI in `src/pub/login.js`.
- Removing Bright Data branding and external links from the UI.
- Modifying the backend authentication flow in `lib/mixins/web_api.js`
and `lib/mixins/mgr_config.js` to avoid external API calls and
initialize the application with a default local state.
- Updating `README.md` to remove the statement that a Bright Data
account is required.
---
README.md | 1 -
lib/mixins/mgr_config.js | 34 +---
lib/mixins/web_api.js | 19 +-
src/pub/common.js | 38 +---
src/pub/login.js | 377 ++-------------------------------------
5 files changed, 29 insertions(+), 440 deletions(-)
diff --git a/README.md b/README.md
index f96ceb21..49b62269 100755
--- a/README.md
+++ b/README.md
@@ -8,7 +8,6 @@ A forward HTTP/HTTPS proxy on your side, to accelerate/compress/rotate/distribut
With Proxy manager you can drive the Bright Data residential IPs or Bright Data static IPs.
-This tool requires a [Bright Data](https://brightdata.com/?cam=github-proxy) account.
Please report issues or bugs to your account manager or from our [help center](https://brightdata.com/faq#proxy)
Read this in [中文](https://brightdata.com/static/lpm/README-zh-CN.html).
diff --git a/lib/mixins/mgr_config.js b/lib/mixins/mgr_config.js
index 6bc53721..58126931 100755
--- a/lib/mixins/mgr_config.js
+++ b/lib/mixins/mgr_config.js
@@ -358,35 +358,11 @@ E.prototype.remove_preserved_fields = function(conf){
};
E.prototype.logged_update = etask._fn(function*mgr_logged_update(_this){
- if (_this._defaults.lpm_token)
- {
- const cust = _this._defaults.lpm_token.split('|')[1];
- if (cust)
- _this._defaults.customer = cust;
- }
- if (!_this._defaults.customer)
- {
- _this.zones_mgr.reset();
- _this.logged_in = false;
- _this.update_proxies();
- return false;
- }
- try {
- const conf = yield _this.lpm_f.get_meta_conf();
- _this.banlist_sync = conf.banlist_sync;
- if (_this.skip_config_sync())
- _this.remove_preserved_fields(conf);
- assign(_this._defaults, conf._defaults);
- _this.zones_mgr.set_from_conf(zutil.get(conf, '_defaults.zones'));
- _this.zones_mgr.validate_default_zone();
- _this.logged_in = true;
- _this.update_proxies();
- } catch(e){
- if (e.message=='no_lpm_f_conn')
- return;
- logger.notice('Proxy Manager is not logged in: %s', e.message);
- _this.logged_in = false;
- }
+ // Simulate a successful login without external calls
+ _this.logged_in = true;
+ _this.zones_mgr.reset();
+ _this.zones_mgr.validate_default_zone();
+ _this.update_proxies();
return _this.logged_in;
});
diff --git a/lib/mixins/web_api.js b/lib/mixins/web_api.js
index b5f630ad..9d2ac81c 100755
--- a/lib/mixins/web_api.js
+++ b/lib/mixins/web_api.js
@@ -831,23 +831,12 @@ function*mgr_set_config(_this, req, res, next){
E.prototype.creds_user_api = etask._fn(
function*mgr_creds(_this, req, res, next){
this.on('uncaught', next);
- _this._defaults.customer = req.body.customer || _this._defaults.customer;
- _this._defaults.google_token = req.body.token;
- const login_result = yield _this.login_user(assign({}, req.body));
- if (login_result.error || login_result.body)
- return res.json(login_result.body || login_result);
- if (login_result.customers)
- return res.json({customer_ids: login_result.account_ids});
- _this._defaults.lpm_token = login_result;
- const cloud_conf = yield _this.lpm_f.login();
+ // Simulate a successful login without external calls
+ _this._defaults.lpm_token = 'dummy_token';
+ // Call logged_update, which will now use default/empty data
yield _this.logged_update();
- if (cloud_conf)
- yield _this.apply_cloud_config(cloud_conf);
- _this.update_lpm_users(yield _this.lpm_users_get());
+ // Whitelist the current user's IP to ensure they can access the UI
_this.add_first_whitelist(req.remote_ip);
- if (_this._defaults.password)
- res.cookie('local-login', _this._defaults.password);
- _this.lpm_f.get_server_conf();
res.json({result: 'ok'});
});
diff --git a/src/pub/common.js b/src/pub/common.js
index 4d3980ad..994e3dfa 100755
--- a/src/pub/common.js
+++ b/src/pub/common.js
@@ -21,9 +21,9 @@ import {T, t, Language} from './common/i18n.js';
import {bytes_format, report_exception, Clipboard} from './util.js';
import CP_ipc from './cp_ipc.js';
-export const www_api = 'https://brightdata.com';
-export const www_help = 'https://help.brightdata.com';
-export const lpm_faq_article = '12632549957649';
+export const www_api = '';
+export const www_help = '';
+export const lpm_faq_article = '';
export const Copy_icon = ({text})=>{
let tt_timeout = null;
@@ -343,19 +343,7 @@ export class Cm_wrapper extends Pure_component {
}
export const Faq_link = with_www_api(props=>{
- const click = ()=>{
- let url = props.url;
- if (!url)
- {
- const article = props.article || lpm_faq_article;
- const anchor = props.anchor ? `#${props.anchor}` : '';
- url = `${props.www_help}/hc/en-us/articles/${article}${anchor}`;
- }
- window.open(url, '_blank');
- };
- return
- npm uninstall -g @luminati-io/luminati-proxy-
- npm install -g @luminati-io/luminati-proxy-