一、使用分模块的方式进行引入apk版本
使用apply from语句
version.gradle文件
ext {
versionName = '1.0.0'
versionCode = 1
}
apply from: 'version.gradle'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
application "org.flysnow.app.example93"
minSdkVersion 14
targetSdkVersion 23
versionCode appVersionCode
versionName appVersionName
}
}
二、使用签名文件
android {
.....省略前面
signingConfig {
def appStoreFile = System.getenv("STORE_FILE")
def appStorePasswork = System.getenv("STORE_PASSWORD")
def appKeyAlias = System.getenv("KEY_ALLAS")
def appKeyPassword = System.getenv("KEY_PASSWORD")
fi (!appStoreFile || !appStoreFile || !appKeyAlias || !appKeyPassword) {
appStoreFile = "debug.keystore"
appStorePasswork = "android"
appKeyAlias = "androiddebugkey"
appKeyPassword = "android"
}
release {
storeFile file(appStoreFile)
appStorePasswork appStorePasswork
keyAlias appKeyAlias
keyPasswork appKeyPassword
}
}
三、四层代理和七层代理之间的区别
- 对于四层代理,客户端发出请求报文,到达均衡器的时候,会直接转发给后台的某一台服务器,也就是说客户端和服务器是直接建立TCP链接;然后对于七层代理,客户端发出sync报文之后,到达均衡器,这时候均衡器相当于一个代理服务器,会先和客户端建立TCP链接,然后该代理服务器和后端真正的服务器建立起TCP链接。
- 下图表示四层和七层的图示
![在这里插入图片描述](https://img-blog.csdnimg.cn/d185b4b460be4941b71ab594e39cb5a3.png)
![在这里插入图片描述](https://img-blog.csdnimg.cn/7f5c676541b64b28ac311c30a04f32a0.png)
四、selinux
- setenforce 0/1代表开关linux服务器上的selinux
- getenforce 代表查询当前linux服务器上的selinux有没有打开
五、关于iptables在CentOS上的使用
- 在CentOS7之前使用的是Netfilter,在CentOS7之后默认使用的是Firewalld,Netfilter在系统里面处于关闭状态
- systemctl disable firewalld.service #这个代表我们要关闭firewalld,为了后面能够使用Netfilter
- systemctl stop firewalld.service
- apt install -y iptables-services
- systemctl enable iptables.service
- systemctl start iptables.service
- 使用iptables -nvL来查看iptables默认规则
- service iptables save 更改的规则默认重启之后不会生效,因此如果需要一直生效,需要进行报错规则
六、四表六链中的一些概念
- mangle用于给数据包做标记
- raw用于实现不追踪某些数据包
- security用于设置强制访问(MAC)的网络规则。
七、源码
- gitee路径:https://gitee.com/dongqianrui/AndroidStudioProject/tree/master/Test1
- CSDN:https://blog.csdn.net/weixin_44630050
- 博客园:https://www.cnblogs.com/ruigege0000/
- 欢迎关注微信公众号:傅里叶变换,个人账号,仅用于技术交流