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

Bosh using https? #140

Open
bwangel opened this issue Feb 23, 2022 · 7 comments
Open

Bosh using https? #140

bwangel opened this issue Feb 23, 2022 · 7 comments
Labels
question Further information is requested

Comments

@bwangel
Copy link

bwangel commented Feb 23, 2022

I have a problem with bosh https
I cannot open bosh connection: https://192.168.8.32:18090/xmpp-httpbind
stroph.js reports: ERR_CONNECTION_CLOSED
but when using http (http://192.168.8.32:8090/xmpp-httpbind) it works.

how can i config bosh using https?

Details (please complete the following information):

  • Tigase version: 8.1.0
  • JVM flavour and version AdoptOpenJDK11
  • Operating system/distribution/version windows server 2012

config.tdsl bosh part:

bosh {
    connections {
        ports = [ 8090, 18090 ]
        /** NOT ok */
        18090(){
            socket = 'ssl'
        }
        /* ok */
        8090(){

        }
    }
    seeOtherHost {}
}

/** all ok **/
httpServer {
    connections {
        8080 (active: false) {}
        18092 () {
            domain = '192.168.8.32'
            socket = 'ssl'
        }
        8092() {
        }
    }
}
@bwangel bwangel added the question Further information is requested label Feb 23, 2022
@woj-tek
Copy link
Contributor

woj-tek commented Feb 23, 2022

stroph.js reports: ERR_CONNECTION_CLOSED

Can you share more details regarding the error?

Do you have correct certificate for the domain?

@bwangel
Copy link
Author

bwangel commented Feb 24, 2022

certificate is this?
certs/192.168.8.32.pem.(tigase auto created )

when visit https://192.168.8.32:18092/index.html, the browser warning me it's a not safe site but can click continue to visit.
all https REST interface works ok.

but only the BOSH API can't connect.
I'm using strophe.js .
but when using http it works ok.
ports as list above.

1 similar comment
@bwangel
Copy link
Author

bwangel commented Feb 24, 2022

certificate is this?
certs/192.168.8.32.pem.(tigase auto created )

when visit https://192.168.8.32:18092/index.html, the browser warning me it's a not safe site but can click continue to visit.
all https REST interface works ok.

but only the BOSH API can't connect.
I'm using strophe.js .
but when using http it works ok.
ports as list above.

@woj-tek
Copy link
Contributor

woj-tek commented Feb 25, 2022

when visit https://192.168.8.32:18092/index.html, the browser warning me it's a not safe site but can click continue to visit.
all https REST interface works ok.

but only the BOSH API can't connect.
I'm using strophe.js .

Quite possibly strophe.js blocks the connection because certificate is self-signed (i.e. those aren't trusted by default).

@bwangel
Copy link
Author

bwangel commented Mar 4, 2022

Yesterday, I bought a commercial certificate(based on IP, not domain).
and all SSL ports are OK except BOSH。
I confirmed i have a config problem on bosh.
But what's a perfect config?

 bosh {
    connections {
        ports = [ 8090, 18090 ]
        /** NOT ok */
        18090(){
            socket = 'ssl'
        }
        /* ok */
        8090(){

        }
    }
    seeOtherHost {}
}

@woj-tek
Copy link
Contributor

woj-tek commented Mar 4, 2022

You don't have to buy the certificate - you can use Let's Encrypt.

You can/should remove ports = [ 8090, 18090 ] line.

Yes, the configuration is correct. I just tested it and it worked just fine:
Captura de pantalla 2022-03-04 a las 14 09 18

@bwangel
Copy link
Author

bwangel commented Mar 7, 2022

Thank you for your testing!
It's ok now.
the reason i thought bosh is base on domain, can't visit by IP .

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

No branches or pull requests

2 participants