Files
libtailscale-drop/ruby/bin/echo_server
2023-03-02 11:07:17 -08:00

20 lines
349 B
Ruby
Executable File

#!/usr/bin/env ruby
# Copyright (c) Tailscale Inc & AUTHORS
# SPDX-License-Identifier: BSD-3-Clause
# frozen_string_literal: true
require "bundler/setup"
require "tailscale"
t = Tailscale::new
t.start
s = t.listen "tcp", ":1997"
while c = s.accept
while got = c.readpartial(2046)
print got
c.write got
end
c.close
end