feat: godoxy agent

This commit is contained in:
yusing
2025-03-28 03:36:35 +08:00
parent 7420abf175
commit 47ab6b8a92
25 changed files with 1612 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package certs
import (
"testing"
. "github.com/yusing/go-proxy/internal/utils/testing"
)
func TestZipCert(t *testing.T) {
ca, crt, key := []byte("test1"), []byte("test2"), []byte("test3")
zipData, err := ZipCert(ca, crt, key)
ExpectNoError(t, err)
ca2, crt2, key2, err := ExtractCert(zipData)
ExpectNoError(t, err)
ExpectBytesEqual(t, ca, ca2)
ExpectBytesEqual(t, crt, crt2)
ExpectBytesEqual(t, key, key2)
}