# Dual HTTP/HTTPs server

**URL:** https://talk.remobjects.com/t/dual-http-https-server/29275
**Category:** Remoting SDK
**Created:** [January 10, 2024, 1:52pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275 "2024-01-10T13:52:57Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![obones](https://talk.remobjects.com/user_avatar/talk.remobjects.com/obones/32/2688_2.png) [@obones](https://talk.remobjects.com/u/obones)
#### Post date: [January 10, 2024, 1:52pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/1 "2024-01-10T13:52:57Z")

</div>

Hello,

I currently have a running server with a `TROSynapseSuperHTTPServer` instance serving clients using `TROSynapseSuperHTTPChannel` all of this with an AES envelope on a binary message.  
I have been asked to add the possibility to configure the server so that it may optionally use a file based SSL certificate while keeping the following capabilities:

BindV4: true  
BindV6: true  
MinSizeForGZipEncoding: 1  
ServerInfoPage: false  
ServeRODL: false

There is no need for older clients to be able to talk to a SSL enabled client as this would pose a security risk.

Looking around here, there were messages saying that the Synapse based classes do not support SSL, but they all date back a few years and things may have changed since then. In particular, I see that there is a file called `ssl_openssl.pas` that hints at “transparent” support when the appropriate OpenSLL DLLs are distributed alongside the application binary.

Thanks for any suggestion

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [January 11, 2024, 9:01am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/2 "2024-01-11T09:01:46Z")

</div>

Hi,

Synapse library was unchanged for several years but I see it was changed recently and they have added OpenSSL v3 support.

I’ll review their changes and update shipped version to the latest revision.

as a workaround, I can suggest to use `TROSuperHTTPServer` and `TROSuperHTTPChannel` that supports SSL.

this article can be useful for you - [SSL/TLS (Delphi)](https://docs.remotingsdk.com/Servers/Technologies/TLS_Delphi/#native-socket-servers)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 11, 2024, 9:02am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/3 "2024-01-11T09:02:32Z")

</div>

Logged as [bugs://D19414](https://www.remobjects.com/portal/bugs/?id=D19414).

---

<div class="post-metadata">

### Author: ![obones](https://talk.remobjects.com/user_avatar/talk.remobjects.com/obones/32/2688_2.png) [@obones](https://talk.remobjects.com/u/obones)
#### Post date: [January 11, 2024, 9:23am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/4 "2024-01-11T09:23:44Z")

</div>

> [@EvgenyK](#):
>
> I’ll review their changes and update shipped version to the latest revision.
> 
> as a workaround, I can suggest to use `TROSuperHTTPServer` and `TROSuperHTTPChannel` that supports SSL.

Thanks for that.

Do you know if the channel handles the 301 permanent return code?  
This way I could have a dummy server listen on the original port that replies with that 301 redirect and get clients to automatically use HTTPs if configured to do so.

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [January 11, 2024, 9:35am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/5 "2024-01-11T09:35:37Z")

</div>

Hi,

my bad - we have only server-side (`TROSuperHTTPServer`) and no client-side.

client-side can be

- TROGrijjySuperHttpChannel
- TROIndySuperHttpChannel
- TROSynapseSuperHttpChannel

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 11, 2024, 2:53pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/6 "2024-01-11T14:53:03Z")

</div>

[bugs://D19414](https://www.remobjects.com/portal/bugs/?id=D19414) was closed as fixed.

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [January 11, 2024, 2:57pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/7 "2024-01-11T14:57:41Z")

</div>

Hi,

[latest Synapse snapshot](https://sourceforge.net/p/synalist/code/HEAD/tree/trunk/)

I’ve tested it with OpenSSL v3 unit (`ssl_openssl3.pas`).

- client channels work as expected
- `TROSynapseSuperTCPServer` supports SSL.
- `TROSynapseHTTPServer` and `TROSynapseSuperHTTPServer` don’t support SSL

---

<div class="post-metadata">

### Author: ![obones](https://talk.remobjects.com/user_avatar/talk.remobjects.com/obones/32/2688_2.png) [@obones](https://talk.remobjects.com/u/obones)
#### Post date: [January 12, 2024, 7:59am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/8 "2024-01-12T07:59:05Z")

</div>

Thanks for this, I’ll see what I can come up with

---

<div class="post-metadata">

### Author: ![obones](https://talk.remobjects.com/user_avatar/talk.remobjects.com/obones/32/2688_2.png) [@obones](https://talk.remobjects.com/u/obones)
#### Post date: [January 22, 2024, 2:40pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/9 "2024-01-22T14:40:12Z")

</div>

It works quite well indeed.  
Any idea if this update will be included in a future version of the SDK?

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [January 22, 2024, 3:18pm UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/10 "2024-01-22T15:18:11Z")

</div>

Hi,

already included into .1581

---

<div class="post-metadata">

### Author: ![obones](https://talk.remobjects.com/user_avatar/talk.remobjects.com/obones/32/2688_2.png) [@obones](https://talk.remobjects.com/u/obones)
#### Post date: [January 29, 2024, 10:39am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/11 "2024-01-29T10:39:33Z")

</div>

I believe there was an issue in packaging the latest snapshot as I can’t see the `ssl_openssl3.pas` source file along with a few other new files in the Synapse folder.  
The prexisting files have been updated just fine but there are at least 6 new files:

Crypt32.pas  
ssl\_openssl11.pas  
ssl\_openssl11\_lib.pas  
ssl\_openssl3.pas  
ssl\_openssl3\_lib.pas  
ssl\_openssl\_capi.pas

Did I miss something here? Or should I wait for a later package?

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [January 29, 2024, 10:57am UTC](https://talk.remobjects.com/t/dual-http-https-server/29275/12 "2024-01-29T10:57:14Z")

</div>

Hi,

Thx for report.  
fixed.

* * *

I’ve attached Synapse folder:  
[Synapse.zip](https://talk.remobjects.com/uploads/short-url/rl5msoVpQPU88iWSYPMmy6eMYmL.zip) (401.4 KB)
