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

This commit is contained in:
2025-11-07 18:27:37 +08:00
parent a508e3cefd
commit f2f63d32e5
9 changed files with 19 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
[server] [server]
address = "127.0.0.1" address = "127.0.0.1"
port = 8080 port = 8085
[server.database] [server.database]
url = "postgresql://username:password@localhost:5432/domains" url = "postgresql://username:password@localhost:5432/domains"

View File

@@ -74,7 +74,7 @@ end
local function loadDomains() local function loadDomains()
print('Loading domains...') 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 = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }
@@ -95,7 +95,7 @@ local function checkAuth()
if authToken then if authToken then
print('Found auth token, checking validity...') print('Found auth token, checking validity...')
local response = fetch('lw://dns.web/auth/me', { local response = fetch('lw://dns.root/auth/me', {
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }

View File

@@ -29,7 +29,7 @@ local renderRecords
local function deleteRecord(recordId) local function deleteRecord(recordId)
print('Deleting DNS record: ' .. 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', method = 'DELETE',
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
@@ -57,7 +57,7 @@ end
-- Actual implementation -- Actual implementation
loadRecords = function() loadRecords = function()
print('Loading DNS records for: ' .. domainName) 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 = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }
@@ -175,7 +175,7 @@ end
local function loadDomain() local function loadDomain()
print('Loading domain details for: ' .. domainName) print('Loading domain details for: ' .. domainName)
local response = fetch('lw://dns.web/domain/' .. domainName, { local response = fetch('lw://dns.root/domain/' .. domainName, {
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }
@@ -197,7 +197,7 @@ local function checkAuth()
if authToken then if authToken then
print('Found auth token, checking validity...') print('Found auth token, checking validity...')
local response = fetch('lw://dns.web/auth/me', { local response = fetch('lw://dns.root/auth/me', {
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }
@@ -228,7 +228,7 @@ end
local function addRecord(type, name, value, ttl) local function addRecord(type, name, value, ttl)
hideError('record-error') hideError('record-error')
local response = fetch('lw://dns.web/domain/' .. domainName .. '/records', { local response = fetch('lw://dns.root/domain/' .. domainName .. '/records', {
method = 'POST', method = 'POST',
headers = { headers = {
['Content-Type'] = 'application/json', ['Content-Type'] = 'application/json',

View File

@@ -75,7 +75,7 @@ end
local function loadTLDs() local function loadTLDs()
print('Loading available TLDs...') print('Loading available TLDs...')
local response = fetch('lw://dns.web/tlds') local response = fetch('lw://dns.root/tlds')
if response:ok() then if response:ok() then
tlds = response:json() tlds = response:json()
@@ -91,7 +91,7 @@ local function checkAuth()
if authToken then if authToken then
print('Found auth token, checking validity...') print('Found auth token, checking validity...')
local response = fetch('lw://dns.web/auth/me', { local response = fetch('lw://dns.root/auth/me', {
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
} }
@@ -127,7 +127,7 @@ local function submitDomain(name, tld)
hideError('domain-error') hideError('domain-error')
print('Submitting domain: ' .. name .. '.' .. tld) print('Submitting domain: ' .. name .. '.' .. tld)
local response = fetch('lw://dns.web/domain', { local response = fetch('lw://dns.root/domain', {
method = 'POST', method = 'POST',
headers = { headers = {
['Content-Type'] = 'application/json', ['Content-Type'] = 'application/json',
@@ -157,7 +157,7 @@ end
local function createInvite() local function createInvite()
print('Creating invite code...') print('Creating invite code...')
local response = fetch('lw://dns.web/auth/invite', { local response = fetch('lw://dns.root/auth/invite', {
method = 'POST', method = 'POST',
headers = { headers = {
Authorization = 'Bearer ' .. authToken Authorization = 'Bearer ' .. authToken
@@ -184,7 +184,7 @@ local function redeemInvite(code)
hideError('redeem-error') hideError('redeem-error')
print('Redeeming invite code: ' .. code) 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', method = 'POST',
headers = { headers = {
['Content-Type'] = 'application/json', ['Content-Type'] = 'application/json',

View File

@@ -21,7 +21,7 @@ submitBtn:on('submit', function(event)
password = password password = password
}) })
print(request_body) print(request_body)
local url = 'lw://dns.web/auth/login' local url = 'lw://dns.root/auth/login'
local headers = { local headers = {
['Content-Type'] = 'application/json' ['Content-Type'] = 'application/json'
} }

View File

@@ -57,7 +57,7 @@ submitBtn:on('submit', function(event)
password = password password = password
}) })
local url = 'lw://dns.web/auth/register' local url = 'lw://dns.root/auth/register'
local headers = { local headers = {
['Content-Type'] = 'application/json' ['Content-Type'] = 'application/json'
} }

View File

@@ -44,7 +44,7 @@ For production deployments, you can use the Gurted Certificate Authority to get
3. **Follow the DNS challenge instructions:** 3. **Follow the DNS challenge instructions:**
When prompted, add the TXT record to your domain: 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 - Login and navigate to your domain
- Add a TXT record with: - Add a TXT record with:
- Name: `_gurtca-challenge` - Name: `_gurtca-challenge`

View File

@@ -3,7 +3,7 @@ use crate::client::{Challenge, GurtCAClient};
pub async fn complete_dns_challenge(challenge: &Challenge, client: &GurtCAClient) -> Result<()> { pub async fn complete_dns_challenge(challenge: &Challenge, client: &GurtCAClient) -> Result<()> {
println!("Please add this TXT record to your domain:"); 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!(" 2. Login and navigate to your domain: {}", challenge.domain);
println!(" 3. Add TXT record:"); println!(" 3. Add TXT record:");
println!(" Name: _gurtca-challenge"); println!(" Name: _gurtca-challenge");
@@ -30,7 +30,7 @@ async fn verify_dns_txt_record(domain: &str, expected_value: &str, client: &Gurt
}); });
let response = client let response = client
.post_json("lw://dns.web/resolve-full", &request) .post_json("lw://dns.root/resolve-full", &request)
.await?; .await?;
if response.is_success() { if response.is_success() {

View File

@@ -12,7 +12,7 @@ struct Cli {
#[command(subcommand)] #[command(subcommand)]
command: Commands, command: Commands,
#[arg(long, default_value = "lw://dns.web")] #[arg(long, default_value = "lw://dns.root")]
ca_url: String, ca_url: String,
} }