My Journey (with guides and code)

I'm following up your journey .
Keep it up and good luck bro .
 
Why do you use Sony phones ? Its for músic automations ?
 
Why do you use Sony phones ? Its for músic automations ?
I used Sony phones in the previous guide as an example, but I am also using other brands. I didn't want to write a guide for every brand and model because the concept is always the same or very similar.
Regarding your second question: emulators would be a cheaper and potentially easier way to do that.
 
I am not going to provide a complete guide here, as there are various things you can do with this information.
If you do not know how to complete the app.js script for your own specific needs, I'd suggest you stop reading here.

Disclaimer: I am using a non-English variant of Windows 11, so some of the translations I provide below, such as those regarding buttons, etc., may slightly differ in the English version.
As always, use this guide entirely at your own risk.

Now, let's proceed with a quick guide on how to have some fun with Node.js.

First, create a directory and type:
Code:
npm install mockttp

Ensure you have OpenSSL installed (for Windows users, you can download it from: https://slproweb.com/products/Win32OpenSSL.html)
In the directory you created, type the following (I used "example" as the certificate's name, but feel free to change it to anything you prefer):
Code:
openssl req -x509 -new -nodes -keyout example.key -sha256 -days 3650 -out example.pem -subj '/CN=Mockttp CA'
openssl x509 -outform der -in example.pem -out example.crt

Next, double-click on the example.crt file in your Windows Explorer.
Click on "Install Certificate" and then click "Next".
Ensure the box beside "Store all certificates in the following ..." is checked (I translated it into English quickly, so I'm not certain what the English version of Windows would display).
Select the "Trustworthy ..." directory, and click OK. Next. Finish.

Create an app.js file and insert the following content:
JavaScript:
(async () => {
    const server = require("mockttp").getLocal({
        https: {
            keyPath: './example.key',
            certPath: './example.pem'
        }
    });

    await server.start(8100);
    console.log(`Server running on port ${server.port}`);

    server.forGet('https://SOME_URL_THAT_MAYBE_INTERESTING')
        .withQuery({ key: 'value' })
        .always()
        .thenFromFile(200, './cache/SOME_RESPONSE_YOU_MAY_WANT_TO_OUTPUT.json', {
            'access-control-allow-credentials': 'true',
            /* You can add more here too... */
            'access-control-max-age': '86400',
            'connection': 'keep-alive',
            'content-type': 'application/json; charset=UTF-8',
            /* Add even more if you want... */
        });

    /* You can add more interesting URLs here... */

    /* The rest goes through */
    server.forAnyRequest().thenPassThrough();
})();

If you're interested in extending your app.js further, check out: https://httptoolkit.github.io/mockttp/
I am also just going to drop in this link too (maybe someone finds it helpful): https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#--proxy-serveraddressport
 
Great posts, OP. I've been wanting to move to LineageOS as well but my phone doesn't have a compatible version :(
Regarding the proxies, this may sound like a stupid question but is it "safe" from a health POV to have that many Wifi dongles running inside the house (as in, if there are 10-20)? I'm probably being paranoid, but wanted to ask regardless.
Will the proxies method work for CentOS7 as well?
 
Great posts, OP. I've been wanting to move to LineageOS as well but my phone doesn't have a compatible version :(
Regarding the proxies, this may sound like a stupid question but is it "safe" from a health POV to have that many Wifi dongles running inside the house (as in, if there are 10-20)? I'm probably being paranoid, but wanted to ask regardless.
Will the proxies method work for CentOS7 as well?
That is true, sometimes it can be a pain looking for a LineageOS version for a phone. I always check if one is available before I purchase a new phone model.

In regards to "proxies and health": I have been concerned about this too, which is why I have everything operating in a separate office room. The small 4G USB sticks do not concern me as much as all of the 5G phones and 5G routers I also have running. I might have to look into renting an additional office or something physically further away from me for my setup.

As for CentOS7: The node.js and Python scripts should not pose any problems, but I don't know for the rest, since I haven't tried it and don't have CentOS running anywhere to test it.
 
In regards to "proxies and health": I have been concerned about this too, which is why I have everything operating in a separate office room. The small 4G USB sticks do not concern me as much as all of the 5G phones and 5G routers I also have running. I might have to look into renting an additional office or something physically further away from me for my setup.
yeah I just run a small farm of devices and I want it to be as far away from me as possible. I'm thinking of getting one of those outdoor CCTV boxes and installing the proxy setup inside it, and wall mounting it outside my house.
 
@Neptun2020
Hey, I have a little problem. The setup works fine, but when I try to rotate IP, the dongle goes into some kind of state, that can't find the network(green light blinking). I need to physically put the dongle out and put it in back then it work again. Maybe you have some ideas?

 
@Neptun2020
Hey, I have a little problem. The setup works fine, but when I try to rotate IP, the dongle goes into some kind of state, that can't find the network(green light blinking). I need to physically put the dongle out and put it in back then it work again. Maybe you have some ideas?

Make sure that your Huawei E3372 USB stick is in HiLink mode. Can you see the web UI visiting the IP address of your device in your browser?
 
That's a pretty neat share. I may start some project with my own 4g proxies since mobile data plans are becoming very affordable in my region
 
Make sure that your Huawei E3372 USB stick is in HiLink mode. Can you see the web UI visiting the IP address of your device in your browser?
Yep, it's in HiLink mode. I can reach the web GUI. The only thing that doesn't work is rotating. It looks like the dongle can't find the network after dropping the previews network. But if I put it out and than back it finds the network in seconds.
 
Very informative journey!

For each of the E3372 USB sticks. What method are you using to buy the mobile 4g SIMs? Do you just buy those online, or go to the store & get a bunch of pre-paid mobile plans?
 
Yep, it's in HiLink mode. I can reach the web GUI. The only thing that doesn't work is rotating. It looks like the dongle can't find the network after dropping the previews network. But if I put it out and than back it finds the network in seconds.
Interesting. I‘ll see if I can find a solution to the problem you are facing and let you know. It could take a couple of days, because I am very busy atm.
 
Thank you for this long inputs friend. And best of luck for your journey.

I'm not a programmer, but i hope to setup my own 4G proxies network (rotating on each request for my visit bot) for my personal use someday.

Can you tell me how many IP's can you generate and rotate with this proxy farm?
 
Yep, it's in HiLink mode. I can reach the web GUI. The only thing that doesn't work is rotating. It looks like the dongle can't find the network after dropping the previews network. But if I put it out and than back it finds the network in seconds.

https://consumer.huawei.com/en/support/routers/e3372/
 
Very informative journey!

For each of the E3372 USB sticks. What method are you using to buy the mobile 4g SIMs? Do you just buy those online, or go to the store & get a bunch of pre-paid mobile plans?
I get monthly plans (with unlimited bandwidth). Every country has different offers, so I can’t really help you here. Check what your local mobile providers have to offer.
 
Back
Top