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

Add API support to manage Telegram proxies. #66

Merged
merged 2 commits into from
Jul 10, 2021

Conversation

davidgfnet
Copy link

This adds new endpoints: getProxies, addProxy, deleteProxy, enableProxy
and disableProxy.
The yaml doc file has been updated to hopefully correct information.

@MarcoBuster
Copy link
Collaborator

Hi, thank you for your PR! The documentation job is failing, please fix :)

@MarcoBuster MarcoBuster added the enhancement New feature or request label Jul 4, 2021
@MarcoBuster MarcoBuster added this to In progress in TDLight bot api via automation Jul 4, 2021
This adds new endpoints: getProxies, addProxy, deleteProxy, enableProxy
and disableProxy.
The yaml doc file has been updated to hopefully correct information.
@davidgfnet
Copy link
Author

Hey mind taking another look at this?

@cavallium
Copy link
Member

@davidgfnet Please the next time don't force-push the pr, because we can't tell what you changed

TDLight bot api automation moved this from In progress to Reviewer approved Jul 9, 2021
object("secret", ptype->secret_);
}
break;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto proxy_user = query->arg("username");
auto proxy_pass = query->arg("password");
type = td_api::make_object<td_api::proxyTypeSocks5>(proxy_user.str(), proxy_pass.str());
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

td::Status Client::process_enable_proxy_query(PromisedQueryPtr &query) {
int32 pid = get_integer_arg(query.get(), "proxy_id", 0, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that the proxy_id cannot be 0?

@davidgfnet
Copy link
Author

Ok I did not force push it this time :)

@cavallium cavallium merged commit 724b814 into tdlight-team:master Jul 10, 2021
TDLight bot api automation moved this from Reviewer approved to Done Jul 10, 2021
@luckydonald
Copy link
Collaborator

I have a few points I think we still need to address, and at least document:

  • A section about proxy support listing the available methods in the README would be nice for those not looking at the changelog too closely.

  • How can the configuration of that be turned off for the public instances we host?

@cavallium
Copy link
Member

I have a few points I think we still need to address, and at least document:

  • A section about proxy support listing the available methods in the README would be nice for those not looking at the changelog too closely.
  • How can the configuration of that be turned off for the public instances we host?

Open a PR with the changes or a new issue, so we can track this problem

@luckydonald luckydonald mentioned this pull request Sep 26, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants