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

feat(ProxyManager): mass-importing proxies #4606

Closed

Conversation

DataM0del
Copy link
Contributor

@DataM0del DataM0del commented Nov 22, 2024

Because I want to mass import proxies from a text file that is splitted by a newline (\n)
Fixes #4599

  • Fix the darn notification spam

image

image

@DataM0del
Copy link
Contributor Author

I was hoping the JS would do the clipboard processing instead of the Kotlin code, but I can work with that anyways.

@DataM0del
Copy link
Contributor Author

it just formatted the file 💀
image

@DataM0del
Copy link
Contributor Author

it just formatted the file 💀 image

reverted it

@DataM0del
Copy link
Contributor Author

thought it would work, the permission dialog that was never shown because JCEF moment told me otherwise.
code
error

@DataM0del
Copy link
Contributor Author

New REST API is the only option, I guess. Or just make it grant all permissions or whatever; just another reminder that this "CEF" or "JCEF" we refer to was only meant to be used as a browser.

TL;DR: Why are we over-complicating things???

@DataM0del
Copy link
Contributor Author

if (clipboard.isNotBlank()) {
val split = clipboard.split(":")
val host = split[0]
val port = split[1].toInt()
if (split.size > 2) {
val username = split[2]
val password = split[3]
ProxyManager.addProxy(host, port, username, password)
} else {
ProxyManager.addProxy(host, port, "", "")
}
}

Why isn't this a guard statement???

@DataM0del
Copy link
Contributor Author

Got detekted, will fix.

@DataM0del
Copy link
Contributor Author

Oh, of course... it's because I added a _ to the parameter name because it was unused...

@DataM0del
Copy link
Contributor Author

dead PR lol, will test.

* Added multi atlas support

* Fix detekt

* Stop using the test atlas size
@DataM0del
Copy link
Contributor Author

bro gift failing CI
image

@DataM0del

This comment was marked as resolved.

@liquidsquid1
Copy link
Contributor

@liquidsquid1 thanks for failing CI 🙏 gonna submit a PR for fixing the failing CI.

that wasn’t me? that was izuna
why do you have to mention me into this

@DataM0del
Copy link
Contributor Author

uhh oop

@DataM0del
Copy link
Contributor Author

was in the BlocksMC step that you added so I assumed that

@DataM0del
Copy link
Contributor Author

Ok, it's fixed now.

@DataM0del
Copy link
Contributor Author

Just tested, it's not working. Will debug and fix this.

@DataM0del
Copy link
Contributor Author

ah, I know why...
the protocol (e.g. "socks{4 | 5}://") has a :. We're splitting by a :, so it the array has an extra useless value at the start.

…from clipboard and from file

mfw it's just a 4 line change, why didn't I do this before when I added the endpoints?...
@DataM0del
Copy link
Contributor Author

image
IT WORKS HAHAAHHAHAHA
...although I don't think it should be spamming notifications

@DataM0del
Copy link
Contributor Author

If you're wondering, I'm testing this on this dataset: https://raw.githubusercontent.com/proxifly/free-proxy-list/main/proxies/countries/US/data.txt

@1zun4
Copy link
Member

1zun4 commented Nov 25, 2024

Don't DDoS the LiquidProxy ping service

No worries. The service is very simple and is written in Rust - it should handle several thousand connections.

@DataM0del
Copy link
Contributor Author

Don't DDoS the LiquidProxy ping service

No worries. The service is very simple and is written in Rust - it should handle several thousand connections.

Okay, I was assuming that maybe 100 or 600 people would be importing 145+ proxies, which would multiply the amount of connections and overwhelm the server. Although I do think the client should choose some other servers randomly in order to balance the load of checking a bit.

@1zun4
Copy link
Member

1zun4 commented Nov 26, 2024

Don't DDoS the LiquidProxy ping service

No worries. The service is very simple and is written in Rust - it should handle several thousand connections.

Okay, I was assuming that maybe 100 or 600 people would be importing 145+ proxies, which would multiply the amount of connections and overwhelm the server. Although I do think the client should choose some other servers randomly in order to balance the load of checking a bit.

We could use Geo Load Balancing - but that is not needed at the moment and would drive up the cost.

What I was thinking about is to use the server list functionality. So for example when you open the proxy manager it will make a request through each proxy to show ping and so on - just like the Server List does.

The only problem with this would be the fact that the ping server is located in Germany - Frankfurt and therefore the latency would appear to be higher than it actually is. But this would allow you to know immediately if a proxy is good or bad, rather than having to check the proxy when adding it.

@DataM0del
Copy link
Contributor Author

Dead PR again

@DataM0del DataM0del changed the base branch from nextgen to nextgen-1.21.4 December 25, 2024 19:08
@DataM0del
Copy link
Contributor Author

image
working on selecting via file

@DataM0del
Copy link
Contributor Author

importing via files works now

@DataM0del
Copy link
Contributor Author

before I mark it as ready for review, I want to implement using the server list as a method of validating. We will fallback to the LiquidProxy ping service if the user doesn't have any servers in the server list or all servers have failed the test

@1zun4 1zun4 deleted the branch CCBlueX:nextgen-1.21.4 December 27, 2024 04:50
@1zun4 1zun4 closed this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants