thornAvery
thornAvery
Explore posts from servers
CDCloudflare Developers
Created by thornAvery on 8/8/2024 in #general-help
Timeout on Non-proxied DNS
Hello. I have an A record managed via Cloudflare, that I have set to Non-proxied, and pointing towards an external VPS that I wish to have serve http/s traffic, as well as be accessed via ssh nslookup shows the correct ip address, and I am able to use the subdomain set in the A record to ssh into the server. However, http/s traffic is timing out when trying to reach the server, which is preventing me from successfully getting my SSL certificates from acme If I set up Nginx to not require certificates, and ensure that port 80 is open, I still recieve a timeout when attempting to access the server via http Am I missing steps for managing simple DNS records with Cloudflare in an unproxied manner?
21 replies
CDCloudflare Developers
Created by thornAvery on 2/21/2024 in #workers-help
Write to R2 with ReadableStream
Im trying to write a ReadableStream to R2, however, I cannot pass a stream to the r2 .put without giving it a fixed size first, so I am piping an email objects stream to a FixedLengthStream as so:
let { readable, writeable } = new FixedLengthStream(message.rawSize);
message.raw.pipeTo(writeable);
let { readable, writeable } = new FixedLengthStream(message.rawSize);
message.raw.pipeTo(writeable);
and then saving it to R2 as follows:
await env.BUCKET_NAME.put(identifier, readable);
await env.BUCKET_NAME.put(identifier, readable);
Im seeing the entry identifier in my R2 bucket, however the content is empty. message.rawSize is showing the number of bytes I would expect. Am I using the stream pipes wrong? Thank you
4 replies
CDCloudflare Developers
Created by thornAvery on 9/8/2023 in #workers-help
workers-rs: Unable to get local issuer certificate
I'm attempting to use the reqwest library within my worker to contact a third-party api.
async fn test_reqwest() -> Result<String> {
let resp = reqwest::get("https://workers.cloudflare.com").await.unwrap().await.unwrap();
Ok(String::from(resp))
}
async fn test_reqwest() -> Result<String> {
let resp = reqwest::get("https://workers.cloudflare.com").await.unwrap().await.unwrap();
Ok(String::from(resp))
}
I am running the worker using wrangler dev When the request is made wrangler shows the following error: workerd/jsg/util.c++:275: error: e = kj/compat/tls.c++:221: failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate The same happens if I use workers Fetch api:
async fn test_reqwest() -> Result<String> {
let mut resp = Fetch::Url("https://httpbin.org/anything".parse().unwrap())
.send()
.await?;
let txt = resp.text().await?;
Ok(String::from(txt))
}
async fn test_reqwest() -> Result<String> {
let mut resp = Fetch::Url("https://httpbin.org/anything".parse().unwrap())
.send()
.await?;
let txt = resp.text().await?;
Ok(String::from(txt))
}
Is there a feature / configuration change I need to make to allow the worker to access third party apis? Thank you.
1 replies
CDCloudflare Developers
Created by thornAvery on 4/26/2023 in #pages-help
LetsEncrypt through Cloudflare Proxy
Hello, Im trying to deploy a server who's URL is proxied via Cloudflare. I can ssh to it through the tunnel, however my LetsEncrypt is failing to register. I'm unsure what the best way to allow this through is, I have added the server to a cloudflare tunnel, added the http/s options in the zero access "public hostname" entry, and added a page rule to disable SSL on the .well-known/acme-challenge route, to no avail. What else should I try? Thank you
8 replies