问题标签 [transport-layer-protocol]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
423 浏览

ns-3 - 我可以在哪里找到 TCP New Reno 的源代码并在 NS3 上运行它

我计划对现有的传输层协议进行一些拥塞控制调整。在这种情况下,我选择了 TCP New Reno。主要是我有两个问题。

1)主要问题是如何找到TCP New Reno的源代码。

2)另一件事是即使我找到了源代码如何在两个节点之间的NS3内部使用它(在seventh.cc中,他们没有指定协议。它采用默认协议。我需要使用TCP New Reno)

我尝试搜索,但与该问题相关的信息很少。我从 NS3 文档中找到了某种源代码。但我认为这不是 TCP New Reno 的真正源代码。

tcp-newreno.h >> 取自https://www.nsnam.org/docs/release/3.18/doxygen/tcp-newreno_8h_source.html

tcp-newreno.cc >> 取自https://www.nsnam.org/docs/release/3.18/doxygen/tcp-newreno_8cc_source.html#l00247

0 投票
1 回答
245 浏览

networking - 运行 VPN 客户端软件时客户端实际发生的情况

当 VPN 客户端正在运行并连接到 Internet 上的 VPN 服务器时,我正在努力寻找关于计算机客户端实际发生的情况的一个很好的解释。

当我们打开并启用VPN应用程序连接到世界某个地方的VPN,然后使用Chrome或Firefox等访问网站时,浏览器软件如何知道连接到VPN IP地址?

我的理解是,通常来自第 3 层的具有源和目标 IP 地址的 IP 数据包被包装在第 2 层的以太网帧中。

当我们使用 VPN 时,目标地址的 IP 数据包是否首先被包裹在另一个数据包中,用于 VPN 服务器?那么 TLS 加密在哪里出现呢?

0 投票
2 回答
254 浏览

tcp - 如果UDP是面向消息的,为什么SMTP使用TCP

所以我们知道UDP是面向消息的,TCP是面向流的。为什么 SMTP 使用 TCP 而不是 UDP?

0 投票
2 回答
481 浏览

go - Gokit:在传输层验证请求/有效负载

我正在使用 go-kit 创建一个 RPC 端点。我正在创建这样的端点

下面是我的 DecodeGetBlogRequest 函数

我想要做的是验证此函数中的 HTTP 请求,如果发现无效,则仅从此处发送带有有效错误代码的响应,而不将其传递给服务层。即如果 ID 不是有效数字,400 Bad Request则从此处返回响应。

但由于我在这个函数中没有 ResponseWriter 引用,我不知道该怎么做。

我正在关注 go-kit 文档 https://gokit.io/examples/stringsvc.html中的这个示例

仅在传输层中验证请求/有效负载并且仅在请求/有效负载有效时才应调用服务层是一个有效的假设吗?如果是,在这个例子中怎么做?

0 投票
2 回答
134 浏览

session - 如果我们有传输层(在 osi 模型中),为什么我们需要两个会话层?

如果传输层中的 tcp 为我们创建了一个会话,那么为什么我们需要会话层为我们创建一个会话呢?

0 投票
1 回答
104 浏览

kubernetes - Using NATS Transport Layer in HELM

I wonder if any HELM guru's can shed some light/point me in the right direction...

I'm testing a PoC where we're using molecular to build an app which has a few services linking in the back-end (ticket,notification). We're using NATS as the transport layer and have managed to get our services to talk to each other when either running the env using docker-compose or a simple k8's file we run using minikube.

Now I'm trying to bring this to our K8's cluster using HELM and am struggling to get NATS to talk to the services. I've tried setting the env var on the services for transportation as nats://nats:4222 and have advertised 4222 as the container port on the NATS chart.

However, once running my helm upgrade install and checking the NATS pod status, it is failing with the following output:

Not sure what I'm missing, should I be advertising the NATS address as an ingress?

Any guidance greatly appreciated

K8's ver: Client: v1.17.2 Server: v1.16.13 HELM ver: v3.1.1 image: nats-streaming:latest (I'm not using the full functionality of streaming, so could downgrade to regular nats if easier)

0 投票
0 回答
16 浏览

http - 如何识别给定 http 请求使用的安全协议?具体来说,如果它使用 TLS 1.3?

给定一个 HTTP 请求 X,我如何确定它是否使用 TLS 1.3?我有一个 .NET 应用程序,我刚刚设置为使用 TLS 1.3

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13.

我现在正在测试这个作品/这个效果。是否有一个请求标头字段表明这一点?找不到一个。

更新:
尝试使用 Wireshark,看起来我应该查看 TLS 记录层,版本字段。

  1. 问题是我无法找到 TLS 1.3 的值应该是什么。
  2. 如上所述,使用 TLS 1.3 从我的 C# 应用程序运行 http 客户端获取请求,不会提供与屏幕截图中显示的不同的协议值。

在此处输入图像描述

0 投票
0 回答
23 浏览

networking - 传输层 (UDP) 上的分段

一个理论问题。

在 OSI 模型中,如何在传输层上实现分片?

我怎样才能“改变”UDP协议来支持那个东西?