net-pioneer/v2ray-connection-limiter

A question and an idea

Closed this issue · 3 comments

Hi pouya, I appreciate your time and effort to write this code.

I have a question and an idea, if you have time to check them please.

Does this code create a log file and save ip addresses, port numbers and uids in the log and compare the new ips with the last one's saved in the log?
If yes, there'll be a problem. The problem is that if the user changes the location(internet access), they'll have more ip addresses saved in the log than specified in the code and will be blocked.

If it's possible, add this feature to the code that clear or delete the log file after every check.

The second ask is that, if you could async the code, this could improve the performance and responsiveness.

Thank you dear.
Good luck.

Hi pouya, I appreciate your time and effort to write this code.

I have a question and an idea, if you have time to check them please.

Does this code create a log file and save ip addresses, port numbers and uids in the log and compare the new ips with the last one's saved in the log? If yes, there'll be a problem. The problem is that if the user changes the location(internet access), they'll have more ip addresses saved in the log than specified in the code and will be blocked.

If it's possible, add this feature to the code that clear or delete the log file after every check.

The second ask is that, if you could async the code, this could improve the performance and responsiveness.

Thank you dear. Good luck.

nope this code works based on connections which downloading (it doesn't count those connections which just connected ! ) . if more than 2 accounts are connecting and downloading it will ban that account .
all notes are in the Doc . read that carefully .

if any connections is disconnected but netstat shows still downloads . it's about your server configurations which means TCP Timeout and keep-alive are badly configured on your server .

Does this code create a log file and save ip addresses, port numbers and uids in the log and compare the new ip

Thank you Pouya jan.

I see that you edited the code a few minutes ago, is it safe to run it now?

and what about async it?

Does this code create a log file and save ip addresses, port numbers and uids in the log and compare the new ip

Thank you Pouya jan.

I see that you edited the code a few minutes ago, is it safe to run it now?

and what about async it?

it's not necessary.
set _max_allowed_connections to 3 or 4 and might help you about that issue