update
Some checks failed
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m17s
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 12m9s
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Some checks failed
Build GurtCA / Build GurtCA (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 11m17s
Build Gurty / Build Gurty (, ubuntu-latest, linux, x86_64-unknown-linux-gnu) (push) Failing after 12m9s
Build GurtCA / Build GurtCA (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
Build Gurty / Build Gurty (.exe, windows-latest, windows, x86_64-pc-windows-msvc) (push) Has been cancelled
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
[server]
|
||||
address = "127.0.0.1"
|
||||
port = 8080
|
||||
port = 8085
|
||||
|
||||
[server.database]
|
||||
url = "postgresql://username:password@localhost:5432/domains"
|
||||
|
||||
@@ -74,7 +74,7 @@ end
|
||||
|
||||
local function loadDomains()
|
||||
print('Loading domains...')
|
||||
local response = fetch('lw://dns.web/auth/domains?page=1&limit=100', {
|
||||
local response = fetch('lw://dns.root/auth/domains?page=1&limit=100', {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
@@ -95,7 +95,7 @@ local function checkAuth()
|
||||
|
||||
if authToken then
|
||||
print('Found auth token, checking validity...')
|
||||
local response = fetch('lw://dns.web/auth/me', {
|
||||
local response = fetch('lw://dns.root/auth/me', {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ local renderRecords
|
||||
local function deleteRecord(recordId)
|
||||
print('Deleting DNS record: ' .. recordId)
|
||||
|
||||
local response = fetch('lw://dns.web/domain/' .. domainName .. '/records/' .. recordId, {
|
||||
local response = fetch('lw://dns.root/domain/' .. domainName .. '/records/' .. recordId, {
|
||||
method = 'DELETE',
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
@@ -57,7 +57,7 @@ end
|
||||
-- Actual implementation
|
||||
loadRecords = function()
|
||||
print('Loading DNS records for: ' .. domainName)
|
||||
local response = fetch('lw://dns.web/domain/' .. domainName .. '/records', {
|
||||
local response = fetch('lw://dns.root/domain/' .. domainName .. '/records', {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
@@ -175,7 +175,7 @@ end
|
||||
|
||||
local function loadDomain()
|
||||
print('Loading domain details for: ' .. domainName)
|
||||
local response = fetch('lw://dns.web/domain/' .. domainName, {
|
||||
local response = fetch('lw://dns.root/domain/' .. domainName, {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
@@ -197,7 +197,7 @@ local function checkAuth()
|
||||
|
||||
if authToken then
|
||||
print('Found auth token, checking validity...')
|
||||
local response = fetch('lw://dns.web/auth/me', {
|
||||
local response = fetch('lw://dns.root/auth/me', {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
@@ -228,7 +228,7 @@ end
|
||||
local function addRecord(type, name, value, ttl)
|
||||
hideError('record-error')
|
||||
|
||||
local response = fetch('lw://dns.web/domain/' .. domainName .. '/records', {
|
||||
local response = fetch('lw://dns.root/domain/' .. domainName .. '/records', {
|
||||
method = 'POST',
|
||||
headers = {
|
||||
['Content-Type'] = 'application/json',
|
||||
|
||||
@@ -75,7 +75,7 @@ end
|
||||
|
||||
local function loadTLDs()
|
||||
print('Loading available TLDs...')
|
||||
local response = fetch('lw://dns.web/tlds')
|
||||
local response = fetch('lw://dns.root/tlds')
|
||||
|
||||
if response:ok() then
|
||||
tlds = response:json()
|
||||
@@ -91,7 +91,7 @@ local function checkAuth()
|
||||
|
||||
if authToken then
|
||||
print('Found auth token, checking validity...')
|
||||
local response = fetch('lw://dns.web/auth/me', {
|
||||
local response = fetch('lw://dns.root/auth/me', {
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
}
|
||||
@@ -127,7 +127,7 @@ local function submitDomain(name, tld)
|
||||
hideError('domain-error')
|
||||
print('Submitting domain: ' .. name .. '.' .. tld)
|
||||
|
||||
local response = fetch('lw://dns.web/domain', {
|
||||
local response = fetch('lw://dns.root/domain', {
|
||||
method = 'POST',
|
||||
headers = {
|
||||
['Content-Type'] = 'application/json',
|
||||
@@ -157,7 +157,7 @@ end
|
||||
|
||||
local function createInvite()
|
||||
print('Creating invite code...')
|
||||
local response = fetch('lw://dns.web/auth/invite', {
|
||||
local response = fetch('lw://dns.root/auth/invite', {
|
||||
method = 'POST',
|
||||
headers = {
|
||||
Authorization = 'Bearer ' .. authToken
|
||||
@@ -184,7 +184,7 @@ local function redeemInvite(code)
|
||||
hideError('redeem-error')
|
||||
print('Redeeming invite code: ' .. code)
|
||||
|
||||
local response = fetch('lw://dns.web/auth/redeem-invite', {
|
||||
local response = fetch('lw://dns.root/auth/redeem-invite', {
|
||||
method = 'POST',
|
||||
headers = {
|
||||
['Content-Type'] = 'application/json',
|
||||
|
||||
@@ -21,7 +21,7 @@ submitBtn:on('submit', function(event)
|
||||
password = password
|
||||
})
|
||||
print(request_body)
|
||||
local url = 'lw://dns.web/auth/login'
|
||||
local url = 'lw://dns.root/auth/login'
|
||||
local headers = {
|
||||
['Content-Type'] = 'application/json'
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ submitBtn:on('submit', function(event)
|
||||
password = password
|
||||
})
|
||||
|
||||
local url = 'lw://dns.web/auth/register'
|
||||
local url = 'lw://dns.root/auth/register'
|
||||
local headers = {
|
||||
['Content-Type'] = 'application/json'
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ For production deployments, you can use the Gurted Certificate Authority to get
|
||||
|
||||
3. **Follow the DNS challenge instructions:**
|
||||
When prompted, add the TXT record to your domain:
|
||||
- Go to lw://dns.web (or your DNS server)
|
||||
- Go to lw://dns.root (or your DNS server)
|
||||
- Login and navigate to your domain
|
||||
- Add a TXT record with:
|
||||
- Name: `_gurtca-challenge`
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::client::{Challenge, GurtCAClient};
|
||||
|
||||
pub async fn complete_dns_challenge(challenge: &Challenge, client: &GurtCAClient) -> Result<()> {
|
||||
println!("Please add this TXT record to your domain:");
|
||||
println!(" 1. Go to lw://dns.web (or your DNS server)");
|
||||
println!(" 1. Go to lw://dns.root (or your DNS server)");
|
||||
println!(" 2. Login and navigate to your domain: {}", challenge.domain);
|
||||
println!(" 3. Add TXT record:");
|
||||
println!(" Name: _gurtca-challenge");
|
||||
@@ -30,7 +30,7 @@ async fn verify_dns_txt_record(domain: &str, expected_value: &str, client: &Gurt
|
||||
});
|
||||
|
||||
let response = client
|
||||
.post_json("lw://dns.web/resolve-full", &request)
|
||||
.post_json("lw://dns.root/resolve-full", &request)
|
||||
.await?;
|
||||
|
||||
if response.is_success() {
|
||||
|
||||
@@ -12,7 +12,7 @@ struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Commands,
|
||||
|
||||
#[arg(long, default_value = "lw://dns.web")]
|
||||
#[arg(long, default_value = "lw://dns.root")]
|
||||
ca_url: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user