2021-05-10 14:13:42 +00:00
|
|
|
cqueues = require "cqueues"
|
|
|
|
socket = require "cqueues.socket"
|
|
|
|
ln = require "ln"
|
|
|
|
|
|
|
|
gemini = require "gemini"
|
|
|
|
|
|
|
|
cq = cqueues.new!
|
|
|
|
|
|
|
|
class ProxyRequestRefusedHandler
|
|
|
|
serve: (ctx, conn) =>
|
|
|
|
conn\write "53 Proxy request refused \r\n"
|
|
|
|
ln.log ctx, {status: 53}
|
|
|
|
|
2021-05-10 14:31:13 +00:00
|
|
|
with gemini.Server ProxyRequestRefusedHandler!
|
2021-05-10 14:13:42 +00:00
|
|
|
\listen socket.listen "127.0.0.1", "58816"
|
2021-05-10 14:41:14 +00:00
|
|
|
\listen socket.listen
|
|
|
|
path: "./var/mipha.sock"
|
|
|
|
unlink: true
|
2021-05-10 14:31:13 +00:00
|
|
|
\attach cq
|
2021-05-10 14:13:42 +00:00
|
|
|
|
|
|
|
assert cq\loop!
|