技術共有

Ubuntu/Openwrt は lua を使用して http および https リクエストを送信します

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

1. lua による http および https リクエストの送信をサポートするための Ubuntu 構成

1.1. 適切なミラーソースを設定する

Ubuntu 22.04.2 LTS (GNU/Linux 6.5.0-41-generic x86_64) へようこそ

リンク: https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.6c1a1b117VwAM7

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

将下面的ubuntu 22.04 LTS (jammy) 配置配置到这个源文件中
sudo mv /etc/apt/sources.list

Ubuntu 22.04 LTS (jammy) の構成は次のとおりです

deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

1.2. 関連する Lua 関連パッケージをインストールする

sudo apt update
sudo apt install -y lua5.3
lua -v
sudo apt install -y liblua5.3-dev

sudo apt install -y luarocks
sudo luarocks install luasocket

2. Openwrt 設定の menuconfig は、http および https リクエストの送信をサポートする lua をサポートします

2.1. メニュー構成を設定する

選択された構成 Languages -