Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 14557

-

by euhjs - 05 March, 2023 - 02:06 AM
This post is by a banned member (Makbodl) - Unhide
This post is by a banned member (euhjs) - Unhide
euhjs  
Supreme
431
Posts
27
Threads
4 Years of service
#10
(07 March, 2023 - 08:19 AM)Makbodl Wrote: Show More
The easiest way to achieve what you want since you want a proxy sorter, is to look at the port, because you can't get it from the domain (its just impossible). So forget about node.js, python is easier.
Quote:def get_proxy_type(proxy):
    port = int(proxy.split(':')[1])
    if port == 80 or port == 8080:
        return 'http'
    elif port == 443:
        return 'https'
    elif port >= 1080 and port <= 1085:
        return 'socks{}'.format(port - 1080)
    else:
        return 'unknown'
pls stop replying if u just copy paste from google
[Image: lew7v8p.png]
This post is by a banned member (Makbodl) - Unhide
This post is by a banned member (euhjs) - Unhide
euhjs  
Supreme
431
Posts
27
Threads
4 Years of service
#12
(07 March, 2023 - 08:28 AM)Makbodl Wrote: Show More
"Ungratefulness is a sad reflection of a person's character, but it should never stop us from extending kindness and compassion to others.." So I highly recommend that you learn some node.js or even python to achieve your goal so you will see the code from a different angle. Here are some good tutorials from Mosh:

https://www.youtube.com/watch?v=TlB_eWDSMt4

https://www.youtube.com/watch?v=_uQrJ0TkZlc&vl=en

Cheers.
useless reply as usual
[Image: lew7v8p.png]
This post is by a banned member (Napakf) - Unhide
Napakf  
Registered
58
Posts
1
Threads
3 Years of service
#13
(This post was last modified: 07 March, 2023 - 09:56 AM by Napakf. Edited 1 time in total.)
(07 March, 2023 - 07:31 AM)Makbodl Wrote: Show More
Try this:
Quote:function checkProxyProtocol(proxyList) {
  for (let proxy of proxyList) {
    if (proxy.startsWith("http://")) {
      return "HTTP";
    } else if (proxy.startsWith("socks4://")) {
      return "SOCKS4";
    } else if (proxy.startsWith("socks5://")) {
      return "SOCKS5";
    } else if (proxy.startsWith("https://")) {
      return "HTTPS";
    }
  }
  return "Unknown";
}

let proxies = ["http://192.168.0.1:8080", "socks4://192.168.0.2:1080", "socks5://192.168.0.3:1080", "https://192.168.0.4:443"]; // You can add your list inside the array or you can call it from a text file next to your JS file
let protocol = checkProxyProtocol(proxies);
console.log(protocol); // Output: SOCKS4

This is too basic, there are apps (open source) to sort and even test the proxies for you if that what you are looking for.
This post is by a banned member (euhjs) - Unhide
euhjs  
Supreme
431
Posts
27
Threads
4 Years of service
#14
(07 March, 2023 - 09:55 AM)Napakf Wrote: Show More
(07 March, 2023 - 07:31 AM)Makbodl Wrote: Show More
Try this:
Quote:function checkProxyProtocol(proxyList) {
  for (let proxy of proxyList) {
    if (proxy.startsWith("http://")) {
      return "HTTP";
    } else if (proxy.startsWith("socks4://")) {
      return "SOCKS4";
    } else if (proxy.startsWith("socks5://")) {
      return "SOCKS5";
    } else if (proxy.startsWith("https://")) {
      return "HTTPS";
    }
  }
  return "Unknown";
}

let proxies = ["http://192.168.0.1:8080", "socks4://192.168.0.2:1080", "socks5://192.168.0.3:1080", "https://192.168.0.4:443"]; // You can add your list inside the array or you can call it from a text file next to your JS file
let protocol = checkProxyProtocol(proxies);
console.log(protocol); // Output: SOCKS4

This is too basic, there are apps (open source) to sort and even test the proxies for you if that what you are looking for.

can u share it ?
[Image: lew7v8p.png]
This post is by a banned member (euhjs) - Unhide
euhjs  
Supreme
431
Posts
27
Threads
4 Years of service
Bumped #15
This is a bump
[Image: lew7v8p.png]
This post is by a banned member (euhjs) - Unhide
euhjs  
Supreme
431
Posts
27
Threads
4 Years of service
Bumped #16
This is a bump
[Image: lew7v8p.png]

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 2 Guest(s)