Commit Graph

54 Commits

Author SHA1 Message Date
Adnan Maolood
f2a1510375 Move documentation to gemini.go 2020-11-09 12:07:49 -05:00
Adnan Maolood
46cbcfcaa4 Remove top-level Get and Do functions 2020-11-09 12:04:53 -05:00
Adnan Maolood
b76080c863 Refactor KnownHosts 2020-11-05 15:27:12 -05:00
Adnan Maolood
cec1f118fb Remove some unnecessary errors 2020-11-04 23:46:05 -05:00
adnano
b57ea57fec Don't expose DefaultClient 2020-11-01 14:27:49 -05:00
Adnan Maolood
8181b86759 Add option to skip trust checks 2020-10-31 22:45:21 -04:00
Adnan Maolood
65a5065250 Refactor client.TrustCertificate workflow 2020-10-31 22:34:51 -04:00
Adnan Maolood
ca8e0166fc Add ErrCertificateNotFound 2020-10-31 16:45:38 -04:00
Adnan Maolood
fbd97a62de Refactor client certificates 2020-10-28 13:41:24 -04:00
Adnan Maolood
768664e0c5 Add ErrInputRequired and ErrCertificateRequired 2020-10-28 01:06:08 -04:00
Adnan Maolood
d1dcf070ff Restrict client certificates to certain paths 2020-10-27 23:34:06 -04:00
Adnan Maolood
fc72224ce9 client: Follow redirects 2020-10-27 22:12:10 -04:00
Adnan Maolood
b84811668c Reject schemes other than gemini:// in NewRequest 2020-10-27 21:18:05 -04:00
Adnan Maolood
239ec885f7 Add (*Client).Get function 2020-10-27 19:22:34 -04:00
Adnan Maolood
79165833de Add (*ResponseWriter).WriteStatus function 2020-10-27 13:30:35 -04:00
Adnan Maolood
f0345f3495 Rename repository to go-gemini 2020-10-24 15:15:32 -04:00
adnano
67842c6425 Rename gemini.go to gmi.go 2020-10-13 20:10:18 -04:00
adnano
4189a4f717 Move errors to gemini.go 2020-10-13 20:10:04 -04:00
adnano
4770ad9112 Rename (*KnownHosts).Load to LoadDefault 2020-10-12 16:56:55 -04:00
adnano
a33a5be063 Update documentation 2020-10-12 16:34:59 -04:00
adnano
065ed828fb Implement server certificate store 2020-10-11 23:48:18 -04:00
adnano
fbc1f76194 Create the certificate store if it does not exist 2020-09-29 11:13:16 -04:00
adnano
956a2bad52 Remove NewCertificateStore function 2020-09-28 00:41:00 -04:00
adnano
cad2d25185 Make the default client generate certificates 2020-09-28 00:38:11 -04:00
adnano
365e94f06e Directly initialize DefaultClient 2020-09-27 22:18:21 -04:00
adnano
7ccf75ad43 Move DefaultClient up 2020-09-27 22:15:36 -04:00
adnano
3428a006ba Move package documentation comment 2020-09-27 21:19:34 -04:00
adnano
3c9821d812 Add more helper functions 2020-09-27 21:13:42 -04:00
adnano
38fe1f21dc Change package name to gmi 2020-09-27 20:20:59 -04:00
adnano
a4a8d49ca7 Add helper handler functions 2020-09-27 20:11:45 -04:00
adnano
73a1692a5b Make TrustCertificate accept hostname instead of request 2020-09-27 16:10:36 -04:00
adnano
e01d59f8f6 Don't store wildcards in the known hosts file 2020-09-27 15:03:46 -04:00
adnano
013b2a4d3e Add function to write known hosts to io.Writer 2020-09-27 14:18:30 -04:00
adnano
ceb40a2fab Implement default client 2020-09-26 16:52:14 -04:00
adnano
927dfd29c5 Refactor TOFU 2020-09-25 23:18:14 -04:00
adnano
b4295dd2dc Implement basic TOFU 2020-09-25 21:43:13 -04:00
adnano
2f43c191cc Reorganize 2020-09-25 19:09:49 -04:00
adnano
d36131356d Rename gemini.go to client.go 2020-09-25 19:07:40 -04:00
adnano
fdb7c9819e Move server code to its own file 2020-09-25 19:06:56 -04:00
adnano
ace3e682de Remove TLSConfig fields 2020-09-25 18:53:20 -04:00
adnano
ec68ab8609 Add test 2020-09-25 11:27:26 -04:00
adnano
99b50e6caf Sort ServeMux entries by length 2020-09-25 11:00:18 -04:00
adnano
eb8c9e0c03 Update README.md 2020-09-25 10:09:41 -04:00
adnano
0cb8083ce3 Update comments 2020-09-24 19:41:50 -04:00
adnano
57a124a8b9 Convert ResponseWriter to struct 2020-09-24 19:38:26 -04:00
adnano
4b27a736ac Use more buffered I/O 2020-09-24 19:22:35 -04:00
adnano
3980cfd28f Use buffered IO 2020-09-24 19:02:03 -04:00
adnano
891c4fbec4 Remove Client struct
Gemini requests are very simple and leave little room for customization,
so a configurable Client is not necessary.
2020-09-24 01:55:41 -04:00
adnano
ace66eceb0 Provide Response with ConnectionState 2020-09-24 01:45:26 -04:00
adnano
fde295cb25 Fix client example 2020-09-24 01:43:03 -04:00