From fbed0af05a7917fb0b85452b2a9a7ed837230cbe Mon Sep 17 00:00:00 2001 From: jiakun Date: Sat, 9 Sep 2023 20:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=8F=96=E6=B6=88=20CMD=20?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=20=20?= =?UTF-8?q?=E7=9A=84=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alpine/opentracker.conf | 20 ++++++++++++++++++++ debian/Dockerfile | 2 +- debian/opentracker.conf | 20 ++++++++++++++++++++ opentracker.conf | 2 +- 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/alpine/opentracker.conf b/alpine/opentracker.conf index db45122..d7faa5b 100644 --- a/alpine/opentracker.conf +++ b/alpine/opentracker.conf @@ -1,11 +1,16 @@ # opentracker config file +# opentracker 配置文件 # # I) Address opentracker will listen on, using both, tcp AND udp family # (note, that port 6969 is implicite if ommitted). +# opentracker将要监听的服务端口,同时监听tcp和udp端口(注意,没有配置则会 +# 默认监听6969端口) # # If no listen option is given (here or on the command line), opentracker # listens on 0.0.0.0:6969 tcp and udp. +# 如果这里没有给出监听端口配置,则opentracker会默认监听 0.0.0.0:6969 tcp +# 和 udp 端口。即 6969/tcp 和 6969/udp 端口 # # The next variable determines if udp sockets are handled in the event # loop (set it to 0, the default) or are handled in blocking reads in @@ -21,6 +26,7 @@ # listen.tcp_udp 10.0.0.5:6969 # # To only listen on tcp or udp family ports, list them this way: +# 如果只想监听 tcp 或 udp 端口,向下面这样设置: # # listen.tcp 0.0.0.0 # listen.udp 192.168.0.1:6969 @@ -33,26 +39,37 @@ # II) If opentracker runs in a non-open mode, point it to files containing # all torrent hashes that it will serve (shell option -w) +# 如果 opentracker 运行在非开放模式(白名单模式),你需要将白名单种子的 +# info hash 值填入白名单文件中,每行一条。并在下面指示白名单文件的路径 +# (或者使用命令行选项 -w 指示) # # access.whitelist /path/to/whitelist # # or, if opentracker was compiled to allow blacklisting (shell option -b) +# 或者,如果opentracker编译时支持黑名单的话,使用以下选项指明黑名单文件所在 +# 路径(或者使用命令行选项 -b 指示) # # access.blacklist ./blacklist # # It is pointless and hence not possible to compile black AND white # listing, so choose one of those options at compile time. File format # is straight forward: "\n\n..." +# 白名单和黑名单配置文件内容应当每行一条16进制的 info hash 值,每行都要以换行 +# 结束,包括最后一行 # # If you do not want to grant anyone access to your stats, enable the # WANT_RESTRICT_STATS option in Makefile and bless the ip addresses # allowed to fetch stats here. +# 如果你不想开放所有统计信息,可以在Makefile中启动 -WANT_RESTRICT_STATS +# 选项。这将只允许以下配置的ip访问统计信息: # # access.stats 192.168.0.23 # # There is another way of hiding your stats. You can obfuscate the path # to them. Normally it is located at /stats but you can configure it to # appear anywhere on your tracker. +# 还有另一种方式隐藏你的统计信息,那就是换一个api路径。通常使用 /stats 路径 +# 但你可以在下面配置另一个访问统计信息的路径: # # access.stats_path stats @@ -91,11 +108,14 @@ # V) Control privilege drop behaviour. # Put in the directory opentracker will chroot/chdir to. All black/white # list files must be put in that directory (shell option -d). +# 配置 opentracker 的chroot/chdir 根路径,所有的白名单/黑名单文件都必须 +# 放在该路径下(命令行选项 -d): # # # tracker.rootdir /usr/local/etc/opentracker # # Tell opentracker which user to setuid to. +# 告知opentracker的运行用户: # # tracker.user nobody # diff --git a/debian/Dockerfile b/debian/Dockerfile index d72c880..4f5fdaf 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -41,4 +41,4 @@ COPY ./blacklist ${XDG_CONFIG_HOME}/blacklist EXPOSE 6969/tcp EXPOSE 6969/udp -CMD ["/bin/opentracker", "-f", "${XDG_CONFIG_HOME}/opentracker.conf", "-d", "${XDG_CONFIG_HOME}"] +CMD ["/bin/opentracker", "-f", "/config/opentracker.conf", "-d", "/config"] diff --git a/debian/opentracker.conf b/debian/opentracker.conf index db45122..d7faa5b 100644 --- a/debian/opentracker.conf +++ b/debian/opentracker.conf @@ -1,11 +1,16 @@ # opentracker config file +# opentracker 配置文件 # # I) Address opentracker will listen on, using both, tcp AND udp family # (note, that port 6969 is implicite if ommitted). +# opentracker将要监听的服务端口,同时监听tcp和udp端口(注意,没有配置则会 +# 默认监听6969端口) # # If no listen option is given (here or on the command line), opentracker # listens on 0.0.0.0:6969 tcp and udp. +# 如果这里没有给出监听端口配置,则opentracker会默认监听 0.0.0.0:6969 tcp +# 和 udp 端口。即 6969/tcp 和 6969/udp 端口 # # The next variable determines if udp sockets are handled in the event # loop (set it to 0, the default) or are handled in blocking reads in @@ -21,6 +26,7 @@ # listen.tcp_udp 10.0.0.5:6969 # # To only listen on tcp or udp family ports, list them this way: +# 如果只想监听 tcp 或 udp 端口,向下面这样设置: # # listen.tcp 0.0.0.0 # listen.udp 192.168.0.1:6969 @@ -33,26 +39,37 @@ # II) If opentracker runs in a non-open mode, point it to files containing # all torrent hashes that it will serve (shell option -w) +# 如果 opentracker 运行在非开放模式(白名单模式),你需要将白名单种子的 +# info hash 值填入白名单文件中,每行一条。并在下面指示白名单文件的路径 +# (或者使用命令行选项 -w 指示) # # access.whitelist /path/to/whitelist # # or, if opentracker was compiled to allow blacklisting (shell option -b) +# 或者,如果opentracker编译时支持黑名单的话,使用以下选项指明黑名单文件所在 +# 路径(或者使用命令行选项 -b 指示) # # access.blacklist ./blacklist # # It is pointless and hence not possible to compile black AND white # listing, so choose one of those options at compile time. File format # is straight forward: "\n\n..." +# 白名单和黑名单配置文件内容应当每行一条16进制的 info hash 值,每行都要以换行 +# 结束,包括最后一行 # # If you do not want to grant anyone access to your stats, enable the # WANT_RESTRICT_STATS option in Makefile and bless the ip addresses # allowed to fetch stats here. +# 如果你不想开放所有统计信息,可以在Makefile中启动 -WANT_RESTRICT_STATS +# 选项。这将只允许以下配置的ip访问统计信息: # # access.stats 192.168.0.23 # # There is another way of hiding your stats. You can obfuscate the path # to them. Normally it is located at /stats but you can configure it to # appear anywhere on your tracker. +# 还有另一种方式隐藏你的统计信息,那就是换一个api路径。通常使用 /stats 路径 +# 但你可以在下面配置另一个访问统计信息的路径: # # access.stats_path stats @@ -91,11 +108,14 @@ # V) Control privilege drop behaviour. # Put in the directory opentracker will chroot/chdir to. All black/white # list files must be put in that directory (shell option -d). +# 配置 opentracker 的chroot/chdir 根路径,所有的白名单/黑名单文件都必须 +# 放在该路径下(命令行选项 -d): # # # tracker.rootdir /usr/local/etc/opentracker # # Tell opentracker which user to setuid to. +# 告知opentracker的运行用户: # # tracker.user nobody # diff --git a/opentracker.conf b/opentracker.conf index 189d0d6..d7faa5b 100644 --- a/opentracker.conf +++ b/opentracker.conf @@ -108,7 +108,7 @@ # V) Control privilege drop behaviour. # Put in the directory opentracker will chroot/chdir to. All black/white # list files must be put in that directory (shell option -d). -# 配置 opentracker 的chroot/chdir 根路径,所有的白名单和黑名单文件都必须 +# 配置 opentracker 的chroot/chdir 根路径,所有的白名单/黑名单文件都必须 # 放在该路径下(命令行选项 -d): # #