From 12a2b7c8154afd62b99be8cb3c07e8c4c95bc0c3 Mon Sep 17 00:00:00 2001 From: sumire Date: Wed, 3 Jan 2024 21:11:39 +0800 Subject: [PATCH] chore(license): insert license info to target files --- cmd/cmd.go | 5 +++++ cmd/internal/su.go | 5 +++++ cmd/run.go | 5 +++++ common/consts/app.go | 5 +++++ common/consts/net.go | 5 +++++ common/netutils/dnsconfig_unix.go | 5 +++++ common/netutils/ip46_test.go | 5 +++++ component/outbound/dialer/annotation.go | 5 +++++ component/outbound/dialer/dialer.go | 5 +++++ component/outbound/dialer/direct.go | 5 +++++ component/outbound/dialer/utils.go | 5 +++++ component/sniffing/internal/quicutils/hkdf.go | 5 +++++ component/sniffing/quic_test.go | 5 +++++ control/anyfrom_pool.go | 5 +++++ control/packet_sniffer_pool_test.go | 5 +++++ hack/maintenance/append_license_signature.sh | 8 ++++---- pkg/trie/trie.go | 5 +++++ 17 files changed, 84 insertions(+), 4 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 3afdcc535a..974ab6b1b6 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package cmd import ( diff --git a/cmd/internal/su.go b/cmd/internal/su.go index 98a6dc23bd..7f349501e2 100644 --- a/cmd/internal/su.go +++ b/cmd/internal/su.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package internal import ( diff --git a/cmd/run.go b/cmd/run.go index 0dbcdeb082..a5236ab598 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package cmd import ( diff --git a/common/consts/app.go b/common/consts/app.go index 1d4df53d83..69b240595b 100644 --- a/common/consts/app.go +++ b/common/consts/app.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package consts var ( diff --git a/common/consts/net.go b/common/consts/net.go index 43e3c963f3..3ca763cbd6 100644 --- a/common/consts/net.go +++ b/common/consts/net.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package consts const ( diff --git a/common/netutils/dnsconfig_unix.go b/common/netutils/dnsconfig_unix.go index 66e50f0054..b9b9d544d0 100644 --- a/common/netutils/dnsconfig_unix.go +++ b/common/netutils/dnsconfig_unix.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + // Modified from go1.18/src/net/dnsconfig_unix.go // Copyright 2009 The Go Authors. All rights reserved. diff --git a/common/netutils/ip46_test.go b/common/netutils/ip46_test.go index 6d416bd40c..25381cba75 100644 --- a/common/netutils/ip46_test.go +++ b/common/netutils/ip46_test.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package netutils import ( diff --git a/component/outbound/dialer/annotation.go b/component/outbound/dialer/annotation.go index ef6153601c..019994cd66 100644 --- a/component/outbound/dialer/annotation.go +++ b/component/outbound/dialer/annotation.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package dialer import ( diff --git a/component/outbound/dialer/dialer.go b/component/outbound/dialer/dialer.go index 65a95d4a4b..2ff01b2079 100644 --- a/component/outbound/dialer/dialer.go +++ b/component/outbound/dialer/dialer.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package dialer import ( diff --git a/component/outbound/dialer/direct.go b/component/outbound/dialer/direct.go index b0aeb190d8..4f4fff5fc8 100644 --- a/component/outbound/dialer/direct.go +++ b/component/outbound/dialer/direct.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package dialer import ( diff --git a/component/outbound/dialer/utils.go b/component/outbound/dialer/utils.go index 0a6f412a1c..25f73c0ea9 100644 --- a/component/outbound/dialer/utils.go +++ b/component/outbound/dialer/utils.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package dialer import "time" diff --git a/component/sniffing/internal/quicutils/hkdf.go b/component/sniffing/internal/quicutils/hkdf.go index 312125b7d5..478eba9e7f 100644 --- a/component/sniffing/internal/quicutils/hkdf.go +++ b/component/sniffing/internal/quicutils/hkdf.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + // Modified from https://github.com/quic-go/quic-go/blob/58cedf7a4f/internal/handshake/hkdf.go package quicutils diff --git a/component/sniffing/quic_test.go b/component/sniffing/quic_test.go index 3e921fc859..b8369d39ed 100644 --- a/component/sniffing/quic_test.go +++ b/component/sniffing/quic_test.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package sniffing import ( diff --git a/control/anyfrom_pool.go b/control/anyfrom_pool.go index c92e4ff702..f0e49b47f6 100644 --- a/control/anyfrom_pool.go +++ b/control/anyfrom_pool.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package control import ( diff --git a/control/packet_sniffer_pool_test.go b/control/packet_sniffer_pool_test.go index d6b4b64ab6..33275ee549 100644 --- a/control/packet_sniffer_pool_test.go +++ b/control/packet_sniffer_pool_test.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + package control import ( diff --git a/hack/maintenance/append_license_signature.sh b/hack/maintenance/append_license_signature.sh index 68e813df0d..f984e3b919 100755 --- a/hack/maintenance/append_license_signature.sh +++ b/hack/maintenance/append_license_signature.sh @@ -9,10 +9,10 @@ insert_lines() { if [ -f "$file" ]; then # Inserting lines at the beginning of the file { - echo "#" - echo "# SPDX-License-Identifier: AGPL-3.0-only" - echo "# Copyright (c) 2022-2024, daeuniverse Organization " - echo "#" + echo "/*" + echo "* SPDX-License-Identifier: AGPL-3.0-only" + echo "* Copyright (c) 2022-2024, daeuniverse Organization " + echo "*/" echo cat "$file" } >tempfile && mv tempfile "$file" diff --git a/pkg/trie/trie.go b/pkg/trie/trie.go index c55fd8c32b..434f5d958a 100644 --- a/pkg/trie/trie.go +++ b/pkg/trie/trie.go @@ -1,3 +1,8 @@ +/* +* SPDX-License-Identifier: AGPL-3.0-only +* Copyright (c) 2022-2024, daeuniverse Organization +*/ + // Package trie is modified from https://github.com/openacid/succinct/blob/loc100/sskv.go. // Slower than about 30% but more than 40% memory saving.