Add ReadMe.md

This commit is contained in:
Nick Peng
2018-07-22 19:16:24 +08:00
parent a1a509f52c
commit a707bf22fd
7 changed files with 330 additions and 62 deletions

102
ReadMe.md
View File

@@ -1,8 +1,11 @@
SmartDNS SmartDNS
============== ==============
SmartDNS是一个运行在本地的DNS服务器SmartDNS接受本地客户端的DNS查询请求从多个上游DNS服务器获取DNS查询结果并将访问速度最快的结果返回个客户端避免DNS污染提高网络访问速度。 SmartDNS是一个运行在本地的DNS服务器SmartDNS接受本地客户端的DNS查询请求从多个上游DNS服务器获取DNS查询结果并将访问速度最快的结果返回个客户端避免DNS污染提高网络访问速度。
同时支持指定特定域名IP地址并高性匹配达到过滤广告的效果。 同时支持指定特定域名IP地址并高性匹配达到过滤广告的效果。
支持树莓派openwrt华硕路由器等设备。
特性 特性
-------------- --------------
1. **多DNS上游服务器** 1. **多DNS上游服务器**
@@ -46,19 +49,27 @@ SmartDNS是一个运行在本地的DNS服务器SmartDNS接受本地客户端
|系统 |安装包|说明 |系统 |安装包|说明
|-----|-----|----- |-----|-----|-----
|标准Linux系统树莓派| smartdns.xxxxxxxx.armhf.deb|支持树莓派Raspbian stretchDebian 9系统。 |标准Linux系统(树莓派)| smartdns.xxxxxxxx.armhf.deb|支持树莓派Raspbian stretchDebian 9系统。
|华硕原生固件|asusware.mipsbig.tar.gz|支持MIPS大端架构的系统如RT-AC55U, RT-AC66U. |华硕原生固件(optware)|smartdns.xxxxxxx.mipsbig.ipk|支持MIPS大端架构的系统如RT-AC55U, RT-AC66U.
|openwrt 15.01|smartdns.xxxxxxxx.ar71xx.ipk|支持AR71XX MIPS系统 |华硕原生固件(optware)|smartdns.xxxxxxx.mipsel.ipk|支持MIPS小端架构的系统如RT-AC68U。
|openwrt LEDE|smartdns.1.2xxxxxxxx.mips_24kc.ipk|支持AR71XX MIPS系统。 |openwrt 15.01|smartdns.xxxxxxxx.ar71xx.ipk|支持AR71XX MIPS系统。
|openwrt LEDE|smartdns.1.2xxxxxxxx.mipsel_24kc.ipk|支持 |openwrt 15.01|smartdns.xxxxxxxx.ramips.ipk|支持MT7620系统
|openwrt LEDE|smartdns.2xxxxxxxx.mips_24kc.ipk|支持AR71XX MIPS系统。
|openwrt LEDE|smartdns.xxxxxxxx.mipsel_24kc.ipk|支持
|openwrt LUCI|luci-app-smartdns.xxxxxxxxx.xxxx.all.ipk|openwrt管理统一界面
[此处下载](https://github.com/pymumu/smartdns/releases)
标准Linux系统安装树莓派 标准Linux系统安装树莓派
-------------- --------------
1. 安装 1. 安装
下载配套安装包`smartdns.xxxxxxxx.armhf.deb`并上传到Linux系统中。 执行如下命令安装
``` ```
dpkg -i smartdns.xxxxxxxx.armhf.deb dpkg -i smartdns.xxxxxxxx.armhf.deb
``` ```
2. 修改配置 2. 修改配置
安装完成后可配置smartdns的上游服务器信息。具体配置参数参考`配置参数`说明。
一般情况下,只需要增加`server [IP]:port`, `server-tcp [IP]:port`配置项
``` ```
vi /etc/smartdns/smartdns.conf vi /etc/smartdns/smartdns.conf
``` ```
@@ -67,13 +78,26 @@ vi /etc/smartdns/smartdns.conf
systemctl enable smartdns systemctl enable smartdns
systemctl start smartdns systemctl start smartdns
``` ```
4. 修改本地路由器DNS指向树莓派 4. 将DNS请求转发的SmartDNS解析。
修改本地路由器的DNS服务器将DNS服务器配置为SmartDNS。
* 登录到本地网络的路由器中配置树莓派分配静态IP地址。 * 登录到本地网络的路由器中配置树莓派分配静态IP地址。
* 修改WAN口或者DHCP DNS为树莓派IP地址。 * 修改WAN口或者DHCP DNS为树莓派IP地址。
注意: 注意:
I. 每款路由器配置方法不尽相同,请百度搜索相关的配置方法。 I. 每款路由器配置方法不尽相同,请百度搜索相关的配置方法。
II. 华为等路由器可能不支持配置DNS为本地IP请修改PC端手机端DNS服务器为树莓派IP。 II. 华为等路由器可能不支持配置DNS为本地IP请修改PC端手机端DNS服务器为树莓派IP。
5. 检测服务是否配置成功。
使用nslookup查询域名看命令结果中的`服务器`项目是否显示为`Linux主机名`如raspberry则表示生效
```
C:\Users\meikechong>nslookup www.baidu.com
服务器: raspberry
Address: 192.168.1.1
非权威应答:
名称: www.a.shifen.com
Address: 14.215.177.39
Aliases: www.baidu.com
```
openwrt/LEDE openwrt/LEDE
-------------- --------------
@@ -81,22 +105,52 @@ openwrt/LEDE
将软件使用winscp上传到路由器的/root目录执行如下命令安装 将软件使用winscp上传到路由器的/root目录执行如下命令安装
``` ```
opkg install smartdns.xxxxxxxx.xxxx.ipk opkg install smartdns.xxxxxxxx.xxxx.ipk
opkg install luci-app-smartdns.xxxxxxxx.xxxx.all.ipk
``` ```
2. 修改配置 2. 修改配置
``` 登陆openwrt管理页面打开Services->SmartDNS进行配置。
vi /etc/smartdns/smartdns.conf * 在Upstream Servers增加上游DNS服务器配置。
``` * 在Domain Address指定特定域名的IP地址可用于广告屏蔽。
3. 启动服务
``` 3. 启动服务
勾选配置页面中的`Enable(启用)`来启动SmartDNS
```
华硕路由器原生固件 华硕路由器原生固件
-------------- --------------
1. 准备
在使用此软件时需要确认路由器是否支持U盘并准备好U盘一个。 在使用此软件时需要确认路由器是否支持U盘并准备好U盘一个。
1. 解压安装包到U盘根目录其目录格式如下。此处仅列出smartdns相关文件 1. 启用SSH登录
登录管理界面,点击`系统管理`->点击`系统设置`,配置`Enable SSH``Lan Only`
SSH登录用户名密码与管理界面相同。
2. 下载`Download Master`
在管理界面点击`USB相关应用`->点击`Download Master`下载。
下载完成后,启用`Download Master`,如果不需要下载功能,此处可以卸载`Download Master`但要保证卸载前Download Master是启用的。
3. 安装SmartDNS
将软件使用winscp上传到路由器的`/tmp/mnt/sda1`目录。或网上邻居复制到sda1共享目录
```
ipkg install smartdns.xxxxxxx.mipsbig.ipk
```
4. 重启路由器生效服务
待路由器启动后使用nslookup查询域名看命令结果中的`服务器`项目是否显示为`smartdns`如显示smartdns则表示生效
```
C:\Users\meikechong>nslookup www.baidu.com
服务器: smartdns
Address: 192.168.1.1
非权威应答:
名称: www.a.shifen.com
Address: 14.215.177.39
Aliases: www.baidu.com
```
5. 额外说明
上述过程smartdns将安装到U盘根目录采用optware的模式运行。
其目录结构如下: 此处仅列出smartdns相关文件
``` ```
U盘 U盘
└── asusware.mipsbig └── asusware.mipsbig
@@ -113,24 +167,14 @@ U盘
| └── smartdns | └── smartdns
.... ....
``` ```
2. 修改配置 如要修改配置可以ssh登录路由器使用vi命令修改
``` ```
vi asusware.mipsbig/etc/smartdns/smartdns.conf vi /opt/etc/smartdns/smartdns.conf
``` ```
3. 启动服务
将U盘插入路由器后方USB插口并重启路由器。
4. 检测DNS服务是否生效 也可以通过网上邻居修改,网上邻居共享目录`sda1`看不到`asusware.mipsbig`目录,但可以直接在`文件管理器`中输入`asusware.mipsbig\etc\init.d`访问。
待路由器启动后使用nslookup查询域名看命令结果中的`服务器`项目是否显示为`smartdns`如显示smartdns则表示生效
``` ```
C:\Users\meikechong>nslookup www.baidu.com \\192.168.1.1\sda1\asusware.mipsbig\etc\init.d
服务器: smartdns
Address: 192.168.1.1
非权威应答:
名称: www.a.shifen.com
Address: 14.215.177.39
Aliases: www.baidu.com
``` ```
配置参数 配置参数
@@ -151,8 +195,10 @@ Aliases: www.baidu.com
|server-tcp|上游TCP DNS|无|[IP][:port],可重复| server-tcp 8.8.8.8:53 |server-tcp|上游TCP DNS|无|[IP][:port],可重复| server-tcp 8.8.8.8:53
|address|指定域名IP地址|无|address /domain/ip| address /www.example.com/1.2.3.4 |address|指定域名IP地址|无|address /domain/ip| address /www.example.com/1.2.3.4
捐助 [捐助](#donate)
============== ==============
* PayPal
[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://paypal.me/PengNick/)
* Alipay 支付宝 * Alipay 支付宝
![alipay](doc/alipay_donate.jpg) ![alipay](doc/alipay_donate.jpg)

219
ReadMe_zh-CN.md Normal file
View File

@@ -0,0 +1,219 @@
SmartDNS
==============
SmartDNS是一个运行在本地的DNS服务器SmartDNS接受本地客户端的DNS查询请求从多个上游DNS服务器获取DNS查询结果并将访问速度最快的结果返回个客户端避免DNS污染提高网络访问速度。
同时支持指定特定域名IP地址并高性匹配达到过滤广告的效果。
支持树莓派openwrt华硕路由器等设备。
特性
--------------
1. **多DNS上游服务器**
支持配置多个上游DNS服务器并同时进行查询即使其中有DNS服务器异常也不会影响查询。
1. **返回最快IP地址**
支持从域名所属IP地址列表中查找到访问速度最快的IP地址并返回给客户端避免DNS污染提高网络访问速度。
1. **支持非标准端口**
支持非53端口查询支持TCP查询有效避免DNS污染。
1. **特定域名IP地址指定**
支持指定域名的IP地址达到广告过滤效果避免恶意网站的效果。
1. **域名高性能后缀匹配**
支持域名后缀匹配模式简化过滤配置过滤20万条记录时间<1ms
1. **Linux多平台支持**
支持标准Linux系统树莓派openwrt系统各种固件华硕路由器原生固件。
1. **支持IPV4, IPV6双栈**
支持IPV4IPV6网络支持查询A, AAAA记录。
1. **高性能,占用资源少**
多线程异步IO模式cache缓存查询结果。
架构
-------------
![Architecture](doc/architecture.png)
1. SmartDNS接收本地网络设备的DNS查询请求如PC手机的查询请求。
2. SmartDNS将查询请求发送到多个上游DNS服务器可采用标准UDP查询非标准端口UDP查询及TCP查询。
3. 上游DNS服务器返回域名对应的Server IP地址列表。SmartDNS检测与本地网络访问速度最快的Server IP。
4. 将访问速度最快的Server IP返回给本地客户端。
使用
==============
下载配套安装包
--------------
下载配套版本的SmartDNS安装包对应安装包配套关系如下。
|系统 |安装包|说明
|-----|-----|-----
|标准Linux系统(树莓派)| smartdns.xxxxxxxx.armhf.deb|支持树莓派Raspbian stretchDebian 9系统。
|华硕原生固件(optware)|smartdns.xxxxxxx.mipsbig.ipk|支持MIPS大端架构的系统如RT-AC55U, RT-AC66U.
|华硕原生固件(optware)|smartdns.xxxxxxx.mipsel.ipk|支持MIPS小端架构的系统如RT-AC68U。
|openwrt 15.01|smartdns.xxxxxxxx.ar71xx.ipk|支持AR71XX MIPS系统。
|openwrt 15.01|smartdns.xxxxxxxx.ramips.ipk|支持MT7620系统
|openwrt LEDE|smartdns.2xxxxxxxx.mips_24kc.ipk|支持AR71XX MIPS系统。
|openwrt LEDE|smartdns.xxxxxxxx.mipsel_24kc.ipk|支持
|openwrt LUCI|luci-app-smartdns.xxxxxxxxx.xxxx.all.ipk|openwrt管理统一界面
[此处下载](https://github.com/pymumu/smartdns/releases)
标准Linux系统安装树莓派
--------------
1. 安装
下载配套安装包`smartdns.xxxxxxxx.armhf.deb`并上传到Linux系统中。 执行如下命令安装
```
dpkg -i smartdns.xxxxxxxx.armhf.deb
```
2. 修改配置
安装完成后可配置smartdns的上游服务器信息。具体配置参数参考`配置参数`说明。
一般情况下,只需要增加`server [IP]:port`, `server-tcp [IP]:port`配置项
```
vi /etc/smartdns/smartdns.conf
```
3. 启动服务
```
systemctl enable smartdns
systemctl start smartdns
```
4. 将DNS请求转发的SmartDNS解析。
修改本地路由器的DNS服务器将DNS服务器配置为SmartDNS。
* 登录到本地网络的路由器中配置树莓派分配静态IP地址。
* 修改WAN口或者DHCP DNS为树莓派IP地址。
注意:
I. 每款路由器配置方法不尽相同,请百度搜索相关的配置方法。
II. 华为等路由器可能不支持配置DNS为本地IP请修改PC端手机端DNS服务器为树莓派IP。
5. 检测服务是否配置成功。
使用nslookup查询域名看命令结果中的`服务器`项目是否显示为`Linux主机名`如raspberry则表示生效
```
C:\Users\meikechong>nslookup www.baidu.com
服务器: raspberry
Address: 192.168.1.1
非权威应答:
名称: www.a.shifen.com
Address: 14.215.177.39
Aliases: www.baidu.com
```
openwrt/LEDE
--------------
1. 安装
将软件使用winscp上传到路由器的/root目录执行如下命令安装
```
opkg install smartdns.xxxxxxxx.xxxx.ipk
opkg install luci-app-smartdns.xxxxxxxx.xxxx.all.ipk
```
2. 修改配置
登陆openwrt管理页面打开Services->SmartDNS进行配置。
* 在Upstream Servers增加上游DNS服务器配置。
* 在Domain Address指定特定域名的IP地址可用于广告屏蔽。
3. 启动服务
勾选配置页面中的`Enable(启用)`来启动SmartDNS
华硕路由器原生固件
--------------
1. 准备
在使用此软件时需要确认路由器是否支持U盘并准备好U盘一个。
1. 启用SSH登录
登录管理界面,点击`系统管理`->点击`系统设置`,配置`Enable SSH``Lan Only`
SSH登录用户名密码与管理界面相同。
2. 下载`Download Master`
在管理界面点击`USB相关应用`->点击`Download Master`下载。
下载完成后,启用`Download Master`,如果不需要下载功能,此处可以卸载`Download Master`但要保证卸载前Download Master是启用的。
3. 安装SmartDNS
将软件使用winscp上传到路由器的`/tmp/mnt/sda1`目录。或网上邻居复制到sda1共享目录
```
ipkg install smartdns.xxxxxxx.mipsbig.ipk
```
4. 重启路由器生效服务
待路由器启动后使用nslookup查询域名看命令结果中的`服务器`项目是否显示为`smartdns`如显示smartdns则表示生效
```
C:\Users\meikechong>nslookup www.baidu.com
服务器: smartdns
Address: 192.168.1.1
非权威应答:
名称: www.a.shifen.com
Address: 14.215.177.39
Aliases: www.baidu.com
```
5. 额外说明
上述过程smartdns将安装到U盘根目录采用optware的模式运行。
其目录结构如下: 此处仅列出smartdns相关文件
```
U盘
└── asusware.mipsbig
├── bin
├── etc
| ├── smartdns
| | └── smartdns.conf
| └── init.d
| └── S50smartdns
├── lib
├── sbin
├── usr
| └── sbin
| └── smartdns
....
```
如要修改配置可以ssh登录路由器使用vi命令修改
```
vi /opt/etc/smartdns/smartdns.conf
```
也可以通过网上邻居修改,网上邻居共享目录`sda1`看不到`asusware.mipsbig`目录,但可以直接在`文件管理器`中输入`asusware.mipsbig\etc\init.d`访问。
```
\\192.168.1.1\sda1\asusware.mipsbig\etc\init.d
```
配置参数
==============
|参数|功能|默认值|配置值|例子|
|--|--|--|--|--|
|server-name|DNS服务器名称|操作系统主机名/smartdns|符合主机名规格的字符串|server-name smartdns
|bind|DNS监听端口号|[::]:53|IP:PORT|bind 192.168.1.1:53
|cache-size|域名结果缓存个数|512|数字|cache-size 512
|rr-ttl|域名结果TTL|远程查询结果|大于0的数字|rr-ttl 600
|rr-ttl-min|允许的最小TTL值|远程查询结果|大于0的数字|rr-ttl-min 60
|rr-ttl-max|允许的最大TTL值|远程查询结果|大于0的数组|rr-ttl-max 600
|log-level|设置日志级别|error|error,warn,info,debug|log-level error
|log-file|日志文件路径|/var/log/smartdns.log|路径|log-file /var/log/smartdns.log
|log-size|日志大小|128K|数字+K,M,G|log-size 128K
|log-num|日志归档个数|2|数字|log-num 2
|server|上游UDP DNS|114.114.114.114|[ip][:port],可重复| server 8.8.8.8:53
|server-tcp|上游TCP DNS|无|[IP][:port],可重复| server-tcp 8.8.8.8:53
|address|指定域名IP地址|无|address /domain/ip| address /www.example.com/1.2.3.4
[捐助](#donate)
==============
* PayPal
[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://paypal.me/PengNick/)
* Alipay 支付宝
![alipay](doc/alipay_donate.jpg)
* Wechat 微信
![wechat](doc/wechat_donate.jpg)
说明
==============
目前代码未开源,后续根据情况开源。

View File

@@ -49,9 +49,6 @@ server 119.29.29.29
# alibaba dns # alibaba dns
server 223.5.5.5 server 223.5.5.5
#OpenDNS
server 208.67.222.222:5353
#LUG #LUG
server 202.141.178.13:5353 server 202.141.178.13:5353
server 202.141.162.123:53 server 202.141.162.123:53

View File

@@ -13,59 +13,40 @@ else
end end
-- Basic -- Basic
s = m:section(TypedSection, "smartdns", translate("SmartDNS Server")) s = m:section(TypedSection, "smartdns", translate("Settings"), translate("General Settings"))
s.anonymous = true s.anonymous = true
s:tab("settings", translate("Settings"))
s:tab("help", translate("Technical Support"))
---- Eanble ---- Eanble
o = s:taboption("settings", Flag, "enabled", translate("Enable"), translate("Enable or disable smartdns server")) o = s:option(Flag, "enabled", translate("Enable"), translate("Enable or disable smartdns server"))
o.rempty = false o.rempty = false
---- Port ---- Port
o = s:taboption("settings", Value, "port", translate("Local Port"), translate("Smartdns local server port")) o = s:option(Value, "port", translate("Local Port"), translate("Smartdns local server port"))
o.placeholder = 5353 o.placeholder = 5353
o.default = 5353 o.default = 5353
o.datatype = "port" o.datatype = "port"
o.rempty = false o.rempty = false
o = s:taboption("settings", Flag, "redirect", translate("redirect"), translate("redirect standard dns query from 53 to smartdns")) o = s:option(Flag, "redirect", translate("redirect"), translate("redirect standard dns query from 53 to smartdns"))
o.default = true o.default = true
o.rempty = false o.rempty = false
---- cache-size ---- cache-size
o = s:taboption("settings", Value, "cache_size", translate("Cache Size"), translate("DNS domain result cache size")) o = s:option(Value, "cache_size", translate("Cache Size"), translate("DNS domain result cache size"))
o.rempty = true o.rempty = true
---- rr-ttl ---- rr-ttl
o = s:taboption("settings", Value, "rr_ttl", translate("Domain TTL"), translate("TTL for all domain result.")) o = s:option(Value, "rr_ttl", translate("Domain TTL"), translate("TTL for all domain result."))
o.rempty = true o.rempty = true
---- rr-ttl-min ---- rr-ttl-min
o = s:taboption("settings", Value, "rr_ttl_min", translate("Domain TTL Min"), translate("Minimum TTL for all domain result.")) o = s:option(Value, "rr_ttl_min", translate("Domain TTL Min"), translate("Minimum TTL for all domain result."))
o.rempty = true o.rempty = true
---- rr-ttl-max ---- rr-ttl-max
o = s:taboption("settings", Value, "rr_ttl_min", translate("Domain TTL Max"), translate("Maximum TTL for all domain result.")) o = s:option(Value, "rr_ttl_min", translate("Domain TTL Max"), translate("Maximum TTL for all domain result."))
o.rempty = true o.rempty = true
o = s:taboption("help", Button, "web")
o.title = translate("SmartDNS official website")
o.inputtitle = translate("open website")
o.inputstyle = "apply"
o.write = function()
luci.http.redirect("https://pymumu.github.io/")
end
o = s:taboption("help", Button, "Donate")
o.title = translate("Donate to smartdns")
o.inputtitle = translate("Donate")
o.inputstyle = "apply"
o.write = function()
luci.http.redirect("https://pymumu.github.io/smartdns")
end
-- Upstream servers -- Upstream servers
s = m:section(TypedSection, "server", translate("Upstream Servers"), translate("Upstream Servers, support UDP, TCP protocol")) s = m:section(TypedSection, "server", translate("Upstream Servers"), translate("Upstream Servers, support UDP, TCP protocol"))
s.anonymous = true s.anonymous = true
@@ -116,5 +97,26 @@ function addr.write(self, section, value)
nixio.fs.writefile("/etc/smartdns/address.conf", value) nixio.fs.writefile("/etc/smartdns/address.conf", value)
end end
-- Doman addresss
s = m:section(TypedSection, "smartdns", translate("Technical Support"),
translate("Technical Support"))
s.anonymous = true
o = s:option(Button, "web")
o.title = translate("SmartDNS official website")
o.inputtitle = translate("open website")
o.inputstyle = "apply"
o.write = function()
luci.http.redirect("https://pymumu.github.io/smartdns")
end
o = s:option(Button, "Donate")
o.title = translate("Donate to smartdns")
o.inputtitle = translate("Donate")
o.inputstyle = "apply"
o.write = function()
luci.http.redirect("https://pymumu.github.io/smartdns/#donate")
end
return m return m

View File

@@ -0,0 +1,3 @@
# Add domains which you want to force to an IP address here.
# The example below send any host in example.com to a local webserver.
#address /example.com/127.0.0.1

View File

@@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2008-2011 OpenWrt.org # Copyright (C) 2018 Nick Peng (pymumu@gmail.com)
START=50 START=50
SERVICE_USE_PID=1 SERVICE_USE_PID=1
@@ -97,7 +97,7 @@ start_service() {
config_foreach load_server "server" config_foreach load_server "server"
echo "# address" >> $SMARTDNS_CONF_TMP echo "# address" >> $SMARTDNS_CONF_TMP
grep "^ *address" $ADDRESS_CONF >> $SMARTDNS_CONF_TMP grep "^ *address " $ADDRESS_CONF >> $SMARTDNS_CONF_TMP
config_get_bool "enabled" "$section" "enabled" '0' config_get_bool "enabled" "$section" "enabled" '0'
mv $SMARTDNS_CONF_TMP $SMARTDNS_CONF mv $SMARTDNS_CONF_TMP $SMARTDNS_CONF

View File

@@ -33,6 +33,7 @@ build()
cp $SMARTDNS_BIN $ROOT/opt/usr/sbin cp $SMARTDNS_BIN $ROOT/opt/usr/sbin
sed -i "s/^\(bind .*\):53/\1:535/g" $ROOT/opt/etc/smartdns/smartdns.conf sed -i "s/^\(bind .*\):53/\1:535/g" $ROOT/opt/etc/smartdns/smartdns.conf
sed -i "s/# *server-name smartdns/server-name smartdns/g" $ROOT/opt/etc/smartdns/smartdns.conf
sed -i "s/^Architecture.*/Architecture: $ARCH/g" $ROOT/control/control sed -i "s/^Architecture.*/Architecture: $ARCH/g" $ROOT/control/control
sed -i "s/Version:.*/Version: $VER/" $ROOT/control/control sed -i "s/Version:.*/Version: $VER/" $ROOT/control/control