Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting a Proxy for Multiple Accounts #272

Open
sagirab opened this issue Mar 12, 2024 · 2 comments
Open

Connecting a Proxy for Multiple Accounts #272

sagirab opened this issue Mar 12, 2024 · 2 comments

Comments

@sagirab
Copy link

sagirab commented Mar 12, 2024

When we open multiple accounts, our IP is used for multiple accounts. Lets say I want to use 100 accounts at the same time, so Instagram will automaticly flag all of the accounts in the same IP because 100 is a lot.

I cannot see any proxy settings in the application. Would be great to set different proxies for different accounts.

@davidmartinrius
Copy link

davidmartinrius commented Apr 4, 2024

You can use instagrapi Much better for the same tasks. I started using SimpleInstabot because it is easy to use. But it is limited to few features. Instagrapi provides a complete instagram unofficial api wrapper, also you can use proxies.

On the other hand, sometimes SimpleInstaBot stops working unexpectedly, it requires a lot of supervision. For example, with instagrapi you can relogin if needed automatically with try excepts, it is more autonomous

@davidmartinrius
Copy link

But if you really want to use this project and with a proxy, you could try something like this. I have not tried the code.

Inside https://github.com/mifi/SimpleInstaBot/blob/master/public/electron.js

const isDev = require('electron-is-dev');
const path = require('path');
const pie = require('puppeteer-in-electron');
const puppeteer = require('puppeteer-core');
const { join } = require('path');
const assert = require('assert');
const fs = require('fs-extra');
const filenamify = require('filenamify');
const yargsParser = require('yargs-parser');

const Instauto = require('instauto');
const moment = require('moment');
const electronRemote = require('@electron/remote/main');

let mainWindow;
let instautoDb;
let instauto;
let instautoWindow;
let logger = console;
let powerSaveBlockerId;

// Proxy configuration
const proxyServer = 'http://your_proxy_address:your_proxy_port';

// Must be called before electron is ready
const pieConnectPromise = (async () => {
  // Launch Puppeteer with proxy configuration
  const browser = await pie.launch(puppeteer, {
    args: [`--proxy-server=${proxyServer}`],
  });

  await pie.initialize(app, browser);
})();

pieConnectPromise.catch(console.error);

electronRemote.initialize();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants