I am currently developing a stateless Discord application using the serenity crate, hosted on Replit. Due to the nature of Replit's network environment, all external SSL/TLS certificates, including those from Discord, are reissued by Replit's firewall. This process leads to a situation where these certificates are not trusted by default in my application, resulting in certificate verification errors when attempting to communicate with Discord's API.
The core of the issue arises from the serenity crate's Http struct, which encapsulates the reqwest::Client but does not allow any modification or customization of it. This limitation prevents me from adding the necessary Replit-issued certificates to the trusted store or configuring SSL/TLS settings to suit my environment. The current implementation of the Http struct is as follows:
Problem
I am currently developing a stateless Discord application using the serenity crate, hosted on Replit. Due to the nature of Replit's network environment, all external SSL/TLS certificates, including those from Discord, are reissued by Replit's firewall. This process leads to a situation where these certificates are not trusted by default in my application, resulting in certificate verification errors when attempting to communicate with Discord's API.
The core of the issue arises from the serenity crate's Http struct, which encapsulates the reqwest::Client but does not allow any modification or customization of it. This limitation prevents me from adding the necessary Replit-issued certificates to the trusted store or configuring SSL/TLS settings to suit my environment. The current implementation of the Http struct is as follows:
Request
Can you make a constructor with a token and a custom certificate or token and custom client?
Error
Debug
openssl s_client -showcerts -connect discord.com:443