有关 nestjs 的循环引用问题;
我有几个 module ,service 引用结构如下
A -> B -> A. 也就是说 A ,B 有相互引用关系;这样会导致循环引用问题; nestjs 编译会报错;
通过查询,了解到的解决方法有两种;
1. 抽离一个 module C ,然后引入 Service A ,B ; 在 A ,B controller 中直接引入 Service C ;那样 service A ,B 就会是单纯业务逻辑,不会引发 circular dependencies
2. 是使用 forwardref
这两种方法都可以;但是有点疑问,希望能得到解惑;谢谢了;
方法 1: 会多出一个 module ; 那如果有关联关系的业务实体,是不是都会引发一个新的 module 来避免 circular dependencies
那我是不是可以把所有的 service 集中在一起 Module Common ,然后供 controller 消费,就能避免在 service 中消费其他 service 引发 circular dependencies ;这样的话 Module Common 就变成了垃圾桶了,啥都放在里面;
方法 2: 有可能发生未知错误;不知道引用关系到底是什么样子的;跟 nestjs 的依赖注入 设计有点相反;不太想用
#service #module #circular #dependencies #引用 #nestjs #Service #controller #Module #Common
我有几个 module ,service 引用结构如下
A -> B -> A. 也就是说 A ,B 有相互引用关系;这样会导致循环引用问题; nestjs 编译会报错;
通过查询,了解到的解决方法有两种;
1. 抽离一个 module C ,然后引入 Service A ,B ; 在 A ,B controller 中直接引入 Service C ;那样 service A ,B 就会是单纯业务逻辑,不会引发 circular dependencies
2. 是使用 forwardref
这两种方法都可以;但是有点疑问,希望能得到解惑;谢谢了;
方法 1: 会多出一个 module ; 那如果有关联关系的业务实体,是不是都会引发一个新的 module 来避免 circular dependencies
那我是不是可以把所有的 service 集中在一起 Module Common ,然后供 controller 消费,就能避免在 service 中消费其他 service 引发 circular dependencies ;这样的话 Module Common 就变成了垃圾桶了,啥都放在里面;
方法 2: 有可能发生未知错误;不知道引用关系到底是什么样子的;跟 nestjs 的依赖注入 设计有点相反;不太想用
#service #module #circular #dependencies #引用 #nestjs #Service #controller #Module #Common
Error adding module to project: null 问题如何解决?
学习黑马的微服务课程遇到的,黑马事先给了一个项目,然后学习到 Eureka 的时候要往项目中添加模块,我添加模块时总是发生**Error adding module to project: null**错误
去搜索引擎上搜索,就说是 sdk 版本过高,用 jdk1.8 就能解决,我换了也不管用,重启 idea 啥的都试过了,没用,路径上没有中文,重启啥的都试过了,不顶用,蹲一个 dalao 教一下解决办法
#试过 #模块 #黑马 #重启 #添加 #Eureka #要往 #Error #adding #module
学习黑马的微服务课程遇到的,黑马事先给了一个项目,然后学习到 Eureka 的时候要往项目中添加模块,我添加模块时总是发生**Error adding module to project: null**错误
去搜索引擎上搜索,就说是 sdk 版本过高,用 jdk1.8 就能解决,我换了也不管用,重启 idea 啥的都试过了,没用,路径上没有中文,重启啥的都试过了,不顶用,蹲一个 dalao 教一下解决办法
#试过 #模块 #黑马 #重启 #添加 #Eureka #要往 #Error #adding #module
分享下 Nginx + thumbor 组合,让 nginx 更好的支持图像裁剪
Nginx 自身提供了一个模块`--with-http_image_filter_module`支持图像裁剪,如果只是单一 Nginx 节点使用,并没有什么问题。但如果是多个 nginx 都需要支持图像裁剪,那么不得不每个 nginx 节点在编译的时候都需要考虑启用`--with-http_image_filter_module`模块。该模块使用 GD 库进行裁剪,性能方面也不是很好。我们完全可以使用更高性能,且更灵活的 thumbor 图像裁剪从而来替代`--with-http_image_filter_module`
大致流程是这样的:

原文我就不全部复制了,有兴趣的可以参考我博客的实现: https://www.xiaoz.me/archives/17836
#裁剪 #-- #http #image #filter #module #模块 #Nginx #nginx #https
Nginx 自身提供了一个模块`--with-http_image_filter_module`支持图像裁剪,如果只是单一 Nginx 节点使用,并没有什么问题。但如果是多个 nginx 都需要支持图像裁剪,那么不得不每个 nginx 节点在编译的时候都需要考虑启用`--with-http_image_filter_module`模块。该模块使用 GD 库进行裁剪,性能方面也不是很好。我们完全可以使用更高性能,且更灵活的 thumbor 图像裁剪从而来替代`--with-http_image_filter_module`
大致流程是这样的:

原文我就不全部复制了,有兴趣的可以参考我博客的实现: https://www.xiaoz.me/archives/17836
#裁剪 #-- #http #image #filter #module #模块 #Nginx #nginx #https
新手运行项目遇到问题
没有了解过 go ,今天需要运行一个 go 的程序,按照这个教程 https://www.bt.cn/bbs/thread-17882-1-1.html 部署了环境一切正常,但是运行:go run main.go 的时候,出现如下的问题:
main.go:23:2: no required module provides package github.com/shirou/gopsutil/cpu: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:24:2: no required module provides package github.com/shirou/gopsutil/mem: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:25:2: no required module provides package github.com/shirou/gopsutil/net: go.mod file not found in current directory or any parent directory; see 'go help modules'
输入:go help modules 后提示如下
Modules are how Go manages dependencies.
A module is a collection of packages that are released, versioned, and
distributed together. Modules may be downloaded directly from version control
repositories or from module proxy servers.
For a series of tutorials on modules, see
https://golang.org/doc/tutorial/create-module.
For a detailed reference on modules, see https://golang.org/ref/mod.
By default, the go command may download modules from https://proxy.golang.org.
It may authenticate modules using the checksum database at
https://sum.golang.org. Both services are operated by the Go team at Google.
The privacy policies for these services are available at
https://proxy.golang.org/privacy and https://sum.golang.org/privacy,
respectively.
The go command's download behavior may be configured using GOPROXY, GOSUMDB,
GOPRIVATE, and other environment variables. See 'go help environment'
and https://golang.org/ref/mod#private-module-privacy for more information.
希望大伙可以帮一下我,谢谢。
#go #https #modules #module #golang #org #directory #mod #see #help
没有了解过 go ,今天需要运行一个 go 的程序,按照这个教程 https://www.bt.cn/bbs/thread-17882-1-1.html 部署了环境一切正常,但是运行:go run main.go 的时候,出现如下的问题:
main.go:23:2: no required module provides package github.com/shirou/gopsutil/cpu: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:24:2: no required module provides package github.com/shirou/gopsutil/mem: go.mod file not found in current directory or any parent directory; see 'go help modules'
main.go:25:2: no required module provides package github.com/shirou/gopsutil/net: go.mod file not found in current directory or any parent directory; see 'go help modules'
输入:go help modules 后提示如下
Modules are how Go manages dependencies.
A module is a collection of packages that are released, versioned, and
distributed together. Modules may be downloaded directly from version control
repositories or from module proxy servers.
For a series of tutorials on modules, see
https://golang.org/doc/tutorial/create-module.
For a detailed reference on modules, see https://golang.org/ref/mod.
By default, the go command may download modules from https://proxy.golang.org.
It may authenticate modules using the checksum database at
https://sum.golang.org. Both services are operated by the Go team at Google.
The privacy policies for these services are available at
https://proxy.golang.org/privacy and https://sum.golang.org/privacy,
respectively.
The go command's download behavior may be configured using GOPROXY, GOSUMDB,
GOPRIVATE, and other environment variables. See 'go help environment'
and https://golang.org/ref/mod#private-module-privacy for more information.
希望大伙可以帮一下我,谢谢。
#go #https #modules #module #golang #org #directory #mod #see #help
你的 Surge for Mac 的最佳实践是?
入手 Surge 有一段时间, 断断续续了解了一些特性。但是自己对 Profile ,Module 的使用没有很轻松掌握。
譬如,从远端安装的 Profile 可以自动更新,但是不能作修改。如果复制一份远端的 Profile ,怎样让也能自动更新?
各位是怎样使用 Surge 的?有没有什么经验可以分享(有其实 Profile ,Module 这一块)
目前自己也用 Surge 做了网关。
也使用了一段时间的 DHCP Server 功能,但是感觉不是很习惯,奇怪的一点是设备实际的 IP 地址和在 Surge 中看到的 IP 地址不相同...后来还是关掉了。
#Surge #Profile #自动更新 #Module #IP #地址 #使用 #一段时间 #但是 #网关
入手 Surge 有一段时间, 断断续续了解了一些特性。但是自己对 Profile ,Module 的使用没有很轻松掌握。
譬如,从远端安装的 Profile 可以自动更新,但是不能作修改。如果复制一份远端的 Profile ,怎样让也能自动更新?
各位是怎样使用 Surge 的?有没有什么经验可以分享(有其实 Profile ,Module 这一块)
目前自己也用 Surge 做了网关。
也使用了一段时间的 DHCP Server 功能,但是感觉不是很习惯,奇怪的一点是设备实际的 IP 地址和在 Surge 中看到的 IP 地址不相同...后来还是关掉了。
#Surge #Profile #自动更新 #Module #IP #地址 #使用 #一段时间 #但是 #网关
M1 MacBook Air 播放 YouTube TV 的 4K 直播非常流畅,但是 11 代低压 U 下却会时常卡顿
之前发过一帖进行讨论: https://www.v2ex.com/t/871652 ,@Satelli 回复说是 Widevine Content Decryption Module 的问题,前两天测试发现确实如此,在浏览器播放 YouTube TV 内容( DRM 内容)时,Widevine CDM 会占用非常多的 CPU 资源,总体占用在 i5-1135G7 上会直接到 100%,在 M1 MacBook Air 上会到 150%-180%,都非常恐怖。( Chrome 和 Edge 均测试)
有讨论这个问题是前几天在浏览 Chrome 107 支持 HEVC 硬解的文章时,看到了 Widevine CDM 将被弃用,Chrome 107 已经内置了一种新的 CDM ,目前讨论还很少,还不到新的 CDM 如何启用,对系统资源占用过多是否有改善。这对于浏览器网页观看 Netflix ,Disney+不知道有多大影响。
相关链接: https://www.xda-developers.com/google-is-deprecating-widevine-for-chromium/
另外 Windows 版的 Chrome 很早就在实验性选项里内置了 Hardware Secure Decryption/Hardware Secure Decryption Experiment/Hardware Secure Decryption Fallback 三个选项,但是实测开启或关闭对 Widevine CDM 没什么影响。
三个选项:
Hardware Secure Decryption(Enable/Disable the use of hardware secure Content Decryption Module (CDM) for protected content playback.)
Hardware Secure Decryption Experiment(Enable/Disable the use of hardware secure Content Decryption Module (CDM) for experimental protected content playback.)
Hardware Secure Decryption Fallback(Allows automatically disabling hardware secure Content Decryption Module (CDM) after failures or crashes. Subsequent playback may use software secure CDMs. If this feature is disabled, the fallback will never happen and users could be stuck with playback failures.)
讨论提示:YouTube TV 和 YouTube 不同,YouTube TV 是观看美国电视直播的流媒体平台,更类似于 Netflix ,Disney+
#Decryption #CDM #Hardware #Secure #Widevine #Content #Module #YouTube #Chrome #secure
之前发过一帖进行讨论: https://www.v2ex.com/t/871652 ,@Satelli 回复说是 Widevine Content Decryption Module 的问题,前两天测试发现确实如此,在浏览器播放 YouTube TV 内容( DRM 内容)时,Widevine CDM 会占用非常多的 CPU 资源,总体占用在 i5-1135G7 上会直接到 100%,在 M1 MacBook Air 上会到 150%-180%,都非常恐怖。( Chrome 和 Edge 均测试)
有讨论这个问题是前几天在浏览 Chrome 107 支持 HEVC 硬解的文章时,看到了 Widevine CDM 将被弃用,Chrome 107 已经内置了一种新的 CDM ,目前讨论还很少,还不到新的 CDM 如何启用,对系统资源占用过多是否有改善。这对于浏览器网页观看 Netflix ,Disney+不知道有多大影响。
相关链接: https://www.xda-developers.com/google-is-deprecating-widevine-for-chromium/
另外 Windows 版的 Chrome 很早就在实验性选项里内置了 Hardware Secure Decryption/Hardware Secure Decryption Experiment/Hardware Secure Decryption Fallback 三个选项,但是实测开启或关闭对 Widevine CDM 没什么影响。
三个选项:
Hardware Secure Decryption(Enable/Disable the use of hardware secure Content Decryption Module (CDM) for protected content playback.)
Hardware Secure Decryption Experiment(Enable/Disable the use of hardware secure Content Decryption Module (CDM) for experimental protected content playback.)
Hardware Secure Decryption Fallback(Allows automatically disabling hardware secure Content Decryption Module (CDM) after failures or crashes. Subsequent playback may use software secure CDMs. If this feature is disabled, the fallback will never happen and users could be stuck with playback failures.)
讨论提示:YouTube TV 和 YouTube 不同,YouTube TV 是观看美国电视直播的流媒体平台,更类似于 Netflix ,Disney+
#Decryption #CDM #Hardware #Secure #Widevine #Content #Module #YouTube #Chrome #secure
go 新手,为啥这个导包会报错啊/(ㄒoㄒ)/~~
```
ubuntu@ubuntu:~$ go mod tidy
...
go: finding module for package github.com/hashicorp/hcl/json/parser
go: finding module for package github.com/hashicorp/hcl/hcl/printer
go: finding module for package github.com/hashicorp/hcl/hcl/ast
go: finding module for package github.com/hashicorp/hcl/hcl/parser
...
github.com/spf13/viper imports github.com/spf13/viper/internal/encoding/hcl imports github.com/hashicorp/hcl/hcl/printer: module github.com/hashicorp/hcl@latest found (v1.0.0), but does not contain package github.com/hashicorp/hcl/hcl/printer
...
```
```bash
ubuntu@ubuntu:~$ go env
GO111MODULE="on"
...
GOVERSION="go1.19.2"
```
最离谱的是 `root` 用户使用 `go mod tidy` 没问题,但两个用户 `GOPATH` 下导的 `hcl` 包一摸一样,搞不清白,求助 ┭┮﹏┭┮
#hcl #github #com #go #hashicorp #module #package #ubuntu #... #finding
```
ubuntu@ubuntu:~$ go mod tidy
...
go: finding module for package github.com/hashicorp/hcl/json/parser
go: finding module for package github.com/hashicorp/hcl/hcl/printer
go: finding module for package github.com/hashicorp/hcl/hcl/ast
go: finding module for package github.com/hashicorp/hcl/hcl/parser
...
github.com/spf13/viper imports github.com/spf13/viper/internal/encoding/hcl imports github.com/hashicorp/hcl/hcl/printer: module github.com/hashicorp/hcl@latest found (v1.0.0), but does not contain package github.com/hashicorp/hcl/hcl/printer
...
```
```bash
ubuntu@ubuntu:~$ go env
GO111MODULE="on"
...
GOVERSION="go1.19.2"
```
最离谱的是 `root` 用户使用 `go mod tidy` 没问题,但两个用户 `GOPATH` 下导的 `hcl` 包一摸一样,搞不清白,求助 ┭┮﹏┭┮
#hcl #github #com #go #hashicorp #module #package #ubuntu #... #finding
Angular SPA 分包加载后如果不同包没有同时更新,跳转路由经常会导致浏览器缓存的旧版本的包被加载,必须要手动刷新一下,怎么解决?
```
const routes: Routes = [
{
path: 'main',
loadChildren: () => import('./main/main.module').then(x => x.MainModule),
canActivate: [AuthGuard]
},
{path: 'sub', loadChildren: () => import('./sub/sub.module').then(x => x.SubModule)},
];
```
例如这样的 route ,从 `main/123` 用 `this.router.navigate` 跳转 `sub/456` 时,如果没有同时更新两个包的话浏览器总是会加载缓存的旧版本`SubModule`,必须要刷新。
#main #sub #path #loadChildren #import #module #SubModule #跳转 #const #routes
```
const routes: Routes = [
{
path: 'main',
loadChildren: () => import('./main/main.module').then(x => x.MainModule),
canActivate: [AuthGuard]
},
{path: 'sub', loadChildren: () => import('./sub/sub.module').then(x => x.SubModule)},
];
```
例如这样的 route ,从 `main/123` 用 `this.router.navigate` 跳转 `sub/456` 时,如果没有同时更新两个包的话浏览器总是会加载缓存的旧版本`SubModule`,必须要刷新。
#main #sub #path #loadChildren #import #module #SubModule #跳转 #const #routes
RF Modules for Smartphones
We all know that the experience of a smartphone depends on the SoC mobile platform it carries, which in turn consists of CPU, GPU, ISP, NPU, and Modem (baseband, also known as Baseband) and other units.
If you ask who is affecting the Internet speed, latency and stability of a smartphone when surfing the Internet? I believe that the answer of many friends is the baseband.
However, the baseband is not the only thing that affects the network performance. The radio frequency + antenna module is also the behind-the-scenes hero that allows the mobile phone to surf the Internet.
In theory, a complete RF module contains "RF + antenna", but for ease of understanding we split them into two parts. If you are interested in the antenna design of mobile phones, you can refer to "The baseband is not enough for 5G mobile phones! Antenna design also has to do surgery! "In this article, we will focus on the RF module in this article.
Let's start with Huawei mobile phones
Last year, Huawei launched a series of new 4G mobile phones, including Mate 40 4G, Mate X2 4G and nova 8i (equipped with Snapdragon 662), which are much cheaper than the starting price of the 5G version.
#mobile #baseband #phones #also #Internet #antenna #module #RF #4G #smartphone
We all know that the experience of a smartphone depends on the SoC mobile platform it carries, which in turn consists of CPU, GPU, ISP, NPU, and Modem (baseband, also known as Baseband) and other units.
If you ask who is affecting the Internet speed, latency and stability of a smartphone when surfing the Internet? I believe that the answer of many friends is the baseband.
However, the baseband is not the only thing that affects the network performance. The radio frequency + antenna module is also the behind-the-scenes hero that allows the mobile phone to surf the Internet.
In theory, a complete RF module contains "RF + antenna", but for ease of understanding we split them into two parts. If you are interested in the antenna design of mobile phones, you can refer to "The baseband is not enough for 5G mobile phones! Antenna design also has to do surgery! "In this article, we will focus on the RF module in this article.
Let's start with Huawei mobile phones
Last year, Huawei launched a series of new 4G mobile phones, including Mate 40 4G, Mate X2 4G and nova 8i (equipped with Snapdragon 662), which are much cheaper than the starting price of the 5G version.
#mobile #baseband #phones #also #Internet #antenna #module #RF #4G #smartphone
请教如何排查 nginx 未响应情况
**我是开发者,目前不知道往哪方面查,请广大 v 友提供思路**
## 问题与现状
不定期出现访问未响应情况,持续时间几分钟,期间 nginx 映射所有访问不了,并服务器也 ssh 不上,日志没出现 Too many open files 等任何报错
服务器:阿里 ecs.g7.large ,2 核 8G 内存
nginx 自己编译
``` bash
nginx version: nginx/1.22.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/home/nginx --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-pcre --with-pcre-jit --with-debug
```
部署服务:很多静态文件,但不是 js 、css 这些
访问量:不太清楚怎么算
## 目前排查情况
1. 调整过 worker_connections 不起作用
2. 在未响应期间,看 cpu 指标,没有明显新增,看 tcp 连接数 ESTABLISHED 和 TIME_WAIT 也不多,因不太懂 tcp 这块,不知是不是这块问题
## nginx 核心配置 摘要
``` conf
#user nobody;
worker_processes 2;
worker_cpu_affinity auto;
pid logs/nginx.pid;
error_log /home/nginx/logs/error.log notice;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
multi_accept on;
accept_mutex on;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
charset utf-8;
#access_log logs/access.log main;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_names_hash_bucket_size 128;
server_names_hash_max_size 512;
keepalive_timeout 65;
send_timeout 30s;
client_header_timeout 15;
client_body_timeout 15;
reset_timedout_connection on;
proxy_connect_timeout 5s;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_comp_level 4;
gzip_types text/css text/xml application/javascript;
gzip_vary on;
gzip_disable "MSIE [1-6].";
include /home/nginx/conf/conf.d/*.conf;
}
```
#-- #http #nginx #module #gzip #timeout #worker #tcp #conf #log
**我是开发者,目前不知道往哪方面查,请广大 v 友提供思路**
## 问题与现状
不定期出现访问未响应情况,持续时间几分钟,期间 nginx 映射所有访问不了,并服务器也 ssh 不上,日志没出现 Too many open files 等任何报错
服务器:阿里 ecs.g7.large ,2 核 8G 内存
nginx 自己编译
``` bash
nginx version: nginx/1.22.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/home/nginx --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-pcre --with-pcre-jit --with-debug
```
部署服务:很多静态文件,但不是 js 、css 这些
访问量:不太清楚怎么算
## 目前排查情况
1. 调整过 worker_connections 不起作用
2. 在未响应期间,看 cpu 指标,没有明显新增,看 tcp 连接数 ESTABLISHED 和 TIME_WAIT 也不多,因不太懂 tcp 这块,不知是不是这块问题
## nginx 核心配置 摘要
``` conf
#user nobody;
worker_processes 2;
worker_cpu_affinity auto;
pid logs/nginx.pid;
error_log /home/nginx/logs/error.log notice;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
multi_accept on;
accept_mutex on;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
charset utf-8;
#access_log logs/access.log main;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_names_hash_bucket_size 128;
server_names_hash_max_size 512;
keepalive_timeout 65;
send_timeout 30s;
client_header_timeout 15;
client_body_timeout 15;
reset_timedout_connection on;
proxy_connect_timeout 5s;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_comp_level 4;
gzip_types text/css text/xml application/javascript;
gzip_vary on;
gzip_disable "MSIE [1-6].";
include /home/nginx/conf/conf.d/*.conf;
}
```
#-- #http #nginx #module #gzip #timeout #worker #tcp #conf #log
[emerg] "stream" directive is not allowed 怎么解哈,已经安装了模块
安装的是 oneinstack,
在 nginx.conf 插入 stream 代码的时候报错,
显示的是`nginx: [emerg] "stream" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:86`
```
stream {
map $ssl_preread_server_name $backend_name {
test.domain.net trojan;
test1.domain.net web;
test2.domain.net web;
}
upstream trojan {
server 127.0.0.1:50443;
}
upstream web {
server 127.0.0.1:445;
}
server {
listen 443 reuseport;
listen [::]:443 reuseport;
proxy_pass $backend_name;
ssl_preread on;
}
}
```
网上普遍反应是没有安装模块,但似乎是装了的哈
```
nginx version: nginx/1.22.1
built by gcc 8.3.0 (Debian 8.3.0-6)
built with OpenSSL 1.1.1s 1 Nov 2022
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-1.1.1s --with-pcre=../pcre-8.45 --with-pcre-jit --with-ld-opt=-ljemalloc
```
感谢
#-- #module #http #nginx #stream #ssl #server #conf #preread #name
安装的是 oneinstack,
在 nginx.conf 插入 stream 代码的时候报错,
显示的是`nginx: [emerg] "stream" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:86`
```
stream {
map $ssl_preread_server_name $backend_name {
test.domain.net trojan;
test1.domain.net web;
test2.domain.net web;
}
upstream trojan {
server 127.0.0.1:50443;
}
upstream web {
server 127.0.0.1:445;
}
server {
listen 443 reuseport;
listen [::]:443 reuseport;
proxy_pass $backend_name;
ssl_preread on;
}
}
```
网上普遍反应是没有安装模块,但似乎是装了的哈
```
nginx version: nginx/1.22.1
built by gcc 8.3.0 (Debian 8.3.0-6)
built with OpenSSL 1.1.1s 1 Nov 2022
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-1.1.1s --with-pcre=../pcre-8.45 --with-pcre-jit --with-ld-opt=-ljemalloc
```
感谢
#-- #module #http #nginx #stream #ssl #server #conf #preread #name