outline-server icon indicating copy to clipboard operation
outline-server copied to clipboard

the traffic limit isn't respected when set to zero before the first connection

Open whlack opened this issue 1 year ago • 5 comments

When we create an access key, and set traffic limit to 0B before first connection, we can connect and use this key as long as we want. But if we set traffic limit to 0B after first connection, all works fine.

whlack avatar Jan 23 '24 16:01 whlack

@whlack, thanks for the issue.

However, I'm experiencing difficulty in replicating the scenario you've described. Could you please provide a more detailed account or enhance the step-by-step instructions for reproducing the problem? Your assistance will help us address the issue more effectively.

murka avatar Feb 19 '24 06:02 murka

  1. Create outline client key, and set traffic limit to 0KB
  2. Connect to this outline key
  • Expected behavior: You couldn't connect to the key, because you have no free traffic.
  • Real behavior: You can connect to the key and use it without any restrictions
  1. After first connection to the key, reset traffic limit, and set it again to 0KB
  • All works fine

whlack avatar Feb 19 '24 14:02 whlack

I've been having the same problem for a very long time, starting around version 1.8.0. But I do not reset the limit; access using keys with a zero limit is terminated automatically when traffic accumulates in the range of 300 - 350 MB, provided that the client reconnects at this moment. Up to 300 MB reconnections are not blocked.

fourclever avatar Mar 25 '24 08:03 fourclever

I'm facing the same problem. Version 1.8.1. When I create a new key with a data limit, it works as if there is no limit. The limit only works, when I try to set it one more time, after the user has disconnected from the server.

I tried to install it manually in the Outline manager, and via the API. The result is the same.

Has anyone come up with a workaround?

VMMHZK avatar Mar 29 '24 07:03 VMMHZK

I sent a merge request which targets this issue, hopefully it will be available in the next update.

But if you want it now, there is a quick surgical way to fix it. it also fixes @fourclever issue which is an hour delay:

  1. docker exec -it shadowbox vi app/main.js
  2. As you're in vi editor, press / then type .isOverDataLimit=s and press enter
  3. After you find isOverDataLimit=s>p press i for insert mode, and put an equal in front of >
  4. Press escape, then write :wq to save and quit
  5. Restart the container Note that it will be overridden by updates.

vi can be bit confusing, here is a gif: isoverdatalimit

cornzzy avatar Jun 07 '24 11:06 cornzzy