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

Listen for all IPs even without SSL config #50

Closed
Djaler opened this issue Dec 31, 2019 · 17 comments
Closed

Listen for all IPs even without SSL config #50

Djaler opened this issue Dec 31, 2019 · 17 comments

Comments

@Djaler
Copy link
Contributor

Djaler commented Dec 31, 2019

I host my bot on heroku, which itself controls everything that is necessary for https. So I don't need and I simply can't provide SSL configuration. But, I should listen for 0.0.0.0, not localhost.

@Djaler
Copy link
Contributor Author

Djaler commented Dec 31, 2019

@InsanusMokrassar
Copy link
Owner

InsanusMokrassar commented Jan 1, 2020

For now, it is required to pass only information about url (0.0.0.0, localhost or something else), port, engine factory (like CIO (I do not recommend it)) and update receiver

@InsanusMokrassar
Copy link
Owner

Of course, you can use method with signature setWebhook(String, Int, UpdatesFilter, ApplicationEngineFactory,...), but anyway it is not required to use certificate

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

Url is an application address, to which requests will be sent after installing the webhook. I am talking about host, which you override here https://github.com/InsanusMokrassar/TelegramBotAPI/blob/0ef4341bafb111eacb7cf147b51605848bb88ed8/src/jvmMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/Webhooks.kt#L95

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

host is "0.0.0.0" by default both in ssl connector and simple connector. I don't thin you should override it. Maybe it should be configurable parameter
https://github.com/ktorio/ktor/blob/fe53ec3bec9591994812faaadf8500e220283cb8/ktor-server/ktor-server-host-common/jvm/src/io/ktor/server/engine/EngineConnectorConfig.kt#L105

@InsanusMokrassar
Copy link
Owner

Understand and fix in 43b08e9

@InsanusMokrassar
Copy link
Owner

So, if it is what you meant, I will close issue and create new version 0.20.4

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

Yeah, looks like this is what I need. Thanks!

@InsanusMokrassar
Copy link
Owner

Glad to help!

Close due to there is fix in 43b08e9

@InsanusMokrassar
Copy link
Owner

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

Hmm. It works only if I specify both:

jcenter()
maven("https://dl.bintray.com/insanusmokrassar/StandardRepository")

and use artifact name TelegramBotAPI-jvm instead of TelegramBotAPI:

implementation("com.github.insanusmokrassar:TelegramBotAPI-jvm:0.20.4")

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

Looks like this is because of multiplatform features of your library, because there also a TelegramBotAPI-js

@InsanusMokrassar
Copy link
Owner

https://blog.gradle.org/gradle-metadata-1.0

It is one of the gradle features. You can just update your gradle wrapper to 6.0 version or higher

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

I already have 6.0.1

@Djaler
Copy link
Contributor Author

Djaler commented Jan 1, 2020

Also, TelegramBotAPI-jvm is available only in your own repo (https://dl.bintray.com/insanusmokrassar/StandardRepository), not in main jcenter: https://jcenter.bintray.com/com/github/insanusmokrassar/

@InsanusMokrassar
Copy link
Owner

So, in this case it must be available using common notation TelegramBotAPI. If it is not, we will create new issue

@InsanusMokrassar
Copy link
Owner

I know about issue with jcenter, but for now I do not know how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants