10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

xinetd と netcat で簡易中継サーバを作る

Posted at

reverse proxy をさせたいけど、nginx や apache を使うほどでもないようなときに。

/etc/xinetd.d/proxy-http

# default: on

service http
{
  port = 80
  socket_type = stream
  protocol = tcp
  wait = no
  user = nobody
  server = /usr/bin/nc
  server_args = -w 5 192.168.4.99 80
  disable = no
}

https の場合:

/etc/xinetd.d/proxy-https

# default: on

service https
{
  port = 443
  socket_type = stream
  protocol = tcp
  wait = no
  user = nobody
  server = /usr/bin/nc
  server_args = -w 5 192.168.4.99 443
  disable = no
}
10
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?