Skip to content

Commit

Permalink
尝试取消 CMD 中对环境变量 的引用
Browse files Browse the repository at this point in the history
  • Loading branch information
jiakun committed Sep 9, 2023
1 parent 8327963 commit fbed0af
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
20 changes: 20 additions & 0 deletions alpine/opentracker.conf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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: "<hex info hash>\n<hex info hash>\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

Expand Down Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
20 changes: 20 additions & 0 deletions debian/opentracker.conf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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: "<hex info hash>\n<hex info hash>\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

Expand Down Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion opentracker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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):
#
#
Expand Down

0 comments on commit fbed0af

Please sign in to comment.