2023-01-23 18:54:21 +07:00
|
|
|
//go:build linux
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2024-01-04 16:28:16 +07:00
|
|
|
* Copyright (c) 2022-2024, daeuniverse Organization <dae@v2raya.org>
|
2023-01-23 18:54:21 +07:00
|
|
|
*/
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2023-04-23 12:27:29 +07:00
|
|
|
"net/http"
|
|
|
|
"os"
|
|
|
|
"time"
|
|
|
|
|
2023-03-14 14:01:55 +07:00
|
|
|
"github.com/daeuniverse/dae/cmd"
|
2023-04-05 17:00:37 +07:00
|
|
|
"github.com/daeuniverse/dae/common/json"
|
|
|
|
jsoniter "github.com/json-iterator/go"
|
2023-03-27 20:44:13 +07:00
|
|
|
"github.com/json-iterator/go/extra"
|
2023-11-15 13:32:57 +07:00
|
|
|
// _ "net/http/pprof"
|
2023-01-23 18:54:21 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2023-11-15 13:32:57 +07:00
|
|
|
// go http.ListenAndServe("0.0.0.0:8000", nil)
|
2023-04-05 17:00:37 +07:00
|
|
|
jsoniter.RegisterTypeDecoder("bool", &json.FuzzyBoolDecoder{})
|
2023-01-27 01:10:27 +07:00
|
|
|
extra.RegisterFuzzyDecoders()
|
|
|
|
|
|
|
|
http.DefaultClient.Timeout = 30 * time.Second
|
|
|
|
if err := cmd.Execute(); err != nil {
|
|
|
|
os.Exit(1)
|
2023-01-23 18:54:21 +07:00
|
|
|
}
|
2023-01-27 01:10:27 +07:00
|
|
|
os.Exit(0)
|
2023-01-23 18:54:21 +07:00
|
|
|
}
|