Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie murphy committed Feb 13, 2025
1 parent 283d2e9 commit fc41156
Show file tree
Hide file tree
Showing 226 changed files with 62 additions and 9,521 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
# extended: true
Expand Down
10 changes: 7 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
baseURL: "https://wdd.js.org"
title: "洞香春"
paginate: 10
pagination:
pagerSize: 10
# theme: ananke
theme: PaperMod

ignoreLogs:
- 'warning-goldmark-raw-html'
enableRobotsTXT: true
buildDrafts: true
buildFuture: false
Expand Down Expand Up @@ -175,7 +177,9 @@ menu:
weight: 31
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
# pygmentsUseClasses: true
# markup:
markup:
renderer:
unsafe: true
# highlight:
# # anchorLineNos: true
# codeFences: true
Expand Down
5 changes: 3 additions & 2 deletions content/network/rp_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tags:
SIP信令阶段都是正常的,但是发现,对于来自node3的RTP流, 并没有从ens192网卡转发给node1上。


{{< mermaid align="left" theme="neutral" >}}

```mermaid
sequenceDiagram
title network
autonumber
Expand All @@ -27,7 +28,7 @@ sequenceDiagram
node1-->>ens192: RTP out
ens224-->>node3: RTP out
node3-->>ens224: RTP in
{{< /mermaid >}}
```

抓包程序抓到了node3发送到ens224上的包,但是排查应用服务器的日志发现,似乎应用服务器根本没有收到node3上过来的包, 所以也就无法转发。

Expand Down
6 changes: 3 additions & 3 deletions content/opensips/ch1/sip-register/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ date: "2019-08-19 21:30:52"
draft: false
---

{{< mermaid align="left" theme="neutral" >}}

```mermaid
sequenceDiagram
autonumber
participant a as 192.168.0.123:55647
Expand Down Expand Up @@ -51,8 +52,7 @@ sequenceDiagram
b-->>a: 401 Unauthorized
a->>b: register cseq=20, callid=3
b-->>a: 200

{{< /mermaid >}}
```

- 服务端设置的过期时间是120s
- 客户端每隔115s注册一次, callid和之前的保持不变
Expand Down
6 changes: 3 additions & 3 deletions content/opensips/ch1/via-route-record-route/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ date: "2022-09-03 02:00:00"
draft: false
---

{{< mermaid align="left" theme="neutral" >}}

```mermaid
sequenceDiagram
title French Words I Know
autonumber
Expand Down Expand Up @@ -33,8 +34,7 @@ sequenceDiagram
p1->>p2: ACK via: a,p1, route: p2,p3
p2->>p3: ACK via: a,p1,p2 route: p3
p3->>b: ACK via: a,p1,p2,p3

{{< /mermaid >}}
```

rr代表record-route头。

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 44 additions & 10 deletions content/opensips/tools/sngrep/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,38 @@ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-fstack-clash-protection -fcf-protection"
```

## 1.4 macOS

```sh
brew install sngrep
```

# 2. 命令行参数

```
sngrep
[-hVcivNqrD]
[-IO pcap_dump]
[-d dev]
[-l limit]
[-k keyfile]
[-LH capture_url]
[<match expression>]
[<bpf filter>]
Usage: sngrep [-hVcivNqrD] [-IO pcap_dump] [-d dev] [-l limit] [-B buffer] [-LHE capture_url] [<match expression>] [<bpf filter>]
-h --help This usage
-V --version Version information
-d --device Use this capture device instead of default
-I --input Read captured data from pcap file
-O --output Write captured data to pcap file
-B --buffer Set pcap buffer size in MB (default: 2)
-c --calls Only display dialogs starting with INVITE
-r --rtp Capture RTP packets payload
-l --limit Set capture limit to N dialogs
-i --icase Make <match expression> case insensitive
-v --invert Invert <match expression>
-N --no-interface Don't display sngrep interface, just capture
-q --quiet Don't print captured dialogs in no interface mode
-D --dump-config Print active configuration settings and exit
-f --config Read configuration from file
-F --no-config Do not read configuration from default config file
-T --text Save pcap to text file
-R --rotate Rotate calls when capture limit have been reached
-H --eep-send Homer sipcapture url (udp:X.X.X.X:XXXX)
-L --eep-listen Listen for encapsulated packets (udp:X.X.X.X:XXXX)
-E --eep-parse Enable EEP parsing in captured packets
```

- `-h --help`: 显示帮助信息
Expand Down Expand Up @@ -87,6 +106,21 @@ sngrep有四个页面,每个页面都有一些不同的快捷键。
3. 原始呼叫信息页面
4. 信息对比页面

在呼叫列表页面和呼叫流程页面都有很多指令和参数可以配置,但是没有人能记住所有的指令和快捷键。

所以,与其记住一堆快捷方式和快捷键,不如记住一个。

这个快捷键就是:**h**, 只要输入h,就能立即呼出帮助手册。

> 这里要注意,sngrep的快捷键很多都是F1、F2之类的快捷键。很多笔记本上,类似的快捷键都是用来做特殊功能的,例如调整亮度和声音。所以要想真正的输入F1、或者F2, 要搭配Fn键一起使用。
在呼叫列表页面按h号
![](atta/2025-02-13-22-45-26.png)

在呼叫流程页面按h号

![](atta/2025-02-13-22-47-02.png)

## 3.1 呼叫列表页面

![](2022-12-02-17-06-23.png)
Expand Down Expand Up @@ -268,7 +302,7 @@ Dialog count: 17

# 6 . sngrep使用注意点

- 不要长时间用sngrep抓包,否则sgrep会占用非常多的内存。如果必须抓一段时间的包,务必使用tcpdump。
- 不要长时间用sngrep抓包,否则sgrep会占用非常多的内存。如果必须抓一段时间的包,务必使用tcpdump。
- 某些情况下,sngrep会丢包
- 某些情况下,sngrep会什么包都抓包不到,注意此时很可能要使用-d去指定抓包的网卡
- sngrep只能捕获本机网卡的收到和发送的流量。假如ABC分别是三台独立虚拟机的SIP服务器,在B上抓包只能分析A-B, 和B-C直接的流量。
Expand Down
1 change: 1 addition & 0 deletions themes/PaperMod
Submodule PaperMod added at a020be
12 changes: 0 additions & 12 deletions themes/PaperMod-bak/.github/FUNDING.yml

This file was deleted.

47 changes: 0 additions & 47 deletions themes/PaperMod-bak/.github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

5 changes: 0 additions & 5 deletions themes/PaperMod-bak/.github/ISSUE_TEMPLATE/config.yml

This file was deleted.

7 changes: 0 additions & 7 deletions themes/PaperMod-bak/.github/ISSUE_TEMPLATE/new-blank-issue.md

This file was deleted.

44 changes: 0 additions & 44 deletions themes/PaperMod-bak/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

17 changes: 0 additions & 17 deletions themes/PaperMod-bak/.github/stale.yml

This file was deleted.

32 changes: 0 additions & 32 deletions themes/PaperMod-bak/.github/workflows/build.yml

This file was deleted.

42 changes: 0 additions & 42 deletions themes/PaperMod-bak/.github/workflows/gh-pages.yml

This file was deleted.

Loading

0 comments on commit fc41156

Please sign in to comment.