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

Specify proxy paramters on Access Key creation API #581

Closed
eddycat opened this issue Feb 18, 2020 · 13 comments
Closed

Specify proxy paramters on Access Key creation API #581

eddycat opened this issue Feb 18, 2020 · 13 comments
Labels
feature request New feature or request needs more info We need more information in order to help or verify stale

Comments

@eddycat
Copy link

eddycat commented Feb 18, 2020

Creates a new access key API add optional parameters: id, password,method.

I use API to link other programs.

@eddycat
Copy link
Author

eddycat commented Feb 18, 2020

Returns the data transferred per access key the returned data is constantly changing, increasing or decreasing, unstable. This is the result of four successive visits:

{"bytesTransferredByUserId":{"0":21045224,"3":31570246}}
{"bytesTransferredByUserId":{"0":21055377,"3":31586350}}
{"bytesTransferredByUserId":{"0":21071544,"3":31611996}}
{"bytesTransferredByUserId":{"0":21069041,"3":31595958}}

With Prometheus query, there is no change in the returned data.

@JonathanDCohen
Copy link
Contributor

Let me make sure I'm reading your comments correctly:

You'd like us to add optional parameters to the POST/access-keys endpoint, and are also reporting instability in the GET metrics/transfer endpoint.

Is that correct?

@eddycat
Copy link
Author

eddycat commented Feb 20, 2020

Let me make sure I'm reading your comments correctly:

You'd like us to add optional parameters to the POST/access-keys endpoint, and are also reporting instability in the GET metrics/transfer endpoint.

Is that correct?

yes

@JonathanDCohen
Copy link
Contributor

Awesome. I'll look into the second issue. For the first issue, what are you trying to do that you need to manually set the password and access key id as opposed to using the generated ones?

I'd be worried about creating an option to set the encryption method. Stream ciphers in particular aren't recommended, even though Shadowsocks accepts them. Can I ask why you're trying to customize this?

@eddycat
Copy link
Author

eddycat commented Feb 20, 2020

Awesome. I'll look into the second issue. For the first issue, what are you trying to do that you need to manually set the password and access key id as opposed to using the generated ones?

I'd be worried about creating an option to set the encryption method. Stream ciphers in particular aren't recommended, even though Shadowsocks accepts them. Can I ask why you're trying to customize this?

I provide users with multiple servers. If I can customize the password, I can create the same password. Users only need to remember one. Randomly generating them needs to remember complex passwords or links. Ports and encryption are not necessary.

@JonathanDCohen
Copy link
Contributor

Are your users not using the Outline client? I'm not sure why they'd need to remember a password

@eddycat
Copy link
Author

eddycat commented Feb 20, 2020

Yes, many users use the original Shadowsocks-Windows or shadowsocks-libev to configure the server manually, they are more lightweight.

@eddycat
Copy link
Author

eddycat commented Feb 20, 2020

In addition, the outline manager shows that the traffic statistics are 30 days. Suppose a user uses 1GB of traffic per day. Will the traffic statistics be 31GB or 30GB after 31 days?

@JonathanDCohen
Copy link
Contributor

Makes sense to me. I would review a PR adding an optional password parameter in a JSON format if you'd like to do it, otherwise I'll put it on our maintenance backlog

@JonathanDCohen
Copy link
Contributor

To your other question, look here https://github.com/Jigsaw-Code/outline-server/blob/master/src/shadowbox/server/server_access_key.ts#L209

It's a 30 day trailing window, so at the beginning of the 30th day it would read 30 GB. The statistics would then waver up and down depending on the specifics of the usage on the 1st and 31st days, but at the end of the 31st day it would read 30 GB

@JonathanDCohen
Copy link
Contributor

For your first issue, if you look https://github.com/Jigsaw-Code/outline-server/blob/master/src/shadowbox/server/manager_metrics.ts#L31 you can see we're querying prometheus directly from the api call. It's not expected that data transfer would be completely stable, as it depends on what the user is doing now as well as 30 days ago.

@fortuna
Copy link
Collaborator

fortuna commented Nov 9, 2020

@eddycat The variation you are seeing in the numbers is an artifact of how Prometheus interpolates the timeseries values. There's a variation, but it should be minimal and not important in practice.

As for the extra API parameters, what are you trying to accomplish?
We are looking into supporting online configs, which should make it easy to migrate users to different servers.

@fortuna fortuna added the needs more info We need more information in order to help or verify label Nov 9, 2020
@fortuna fortuna added the feature request New feature or request label Nov 10, 2020
@fortuna fortuna added the stale label Jan 29, 2021
@fortuna fortuna changed the title Access Keys Management API Specify proxy paramters on Access Key creation API Jan 29, 2021
@fortuna
Copy link
Collaborator

fortuna commented Oct 20, 2021

The method parameter is being added: #1002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request needs more info We need more information in order to help or verify stale
Projects
None yet
Development

No branches or pull requests

4 participants