我想建立自己的安全垃圾邮件服务(TextSecure Server + PushServer + Android App +另一个必要的项目) 如何在我的服务器上运行TextSecure服务器? 首先,我用maven构建了WebSocket-Resources。 第二个我构建了TextSecure服务器。(mvn clean install -DskipTests) 在我运行java -jar target / textsecure-server.jar server config / server.yml
之后和
我改变了
buildConfigField" String"," TEXTSECURE_URL", " \" https://my_server_ip:8080 \""
build.gradle文件中的行(Android App)
但我收到了错误 第一个错误(客户端) - >连接错误....无法连接到推送服务
第二个错误(textsecure-server)--->
WARN [2015-12-01 13:45:43,489] org.eclipse.jetty.http.HttpParser: 状态中的非法字符0x16 =缓冲区的START HeapByteBuffer @ 4c112d16 [P = 1,L = 208,C = 8192,R = 207] = {\ X16<<< \ X03 \ X01 \ X00 \ XCB \ X01 \ X00 \ X00 \ xC7 \ X03 \ x01V] \ XA4 \ XC1 \ x08e \ XC6 ... \ X01 \ X00 \ X02 \ X00 \ X03 \ X00 \ X0F \ X00 \ X10 \ X00 \ X11 \ X00#\ X00 \ X00>>> \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00} WARN [2015-12-01 13:45:43,489] org.eclipse.jetty.http.HttpParser: badMessage:400非法字符0x16表示 HttpChannelOverHttp @ 3669e012 {r = 0,c = false,a = IDLE,uri = - } WARN [2015-12-01 13:45:43,495] org.eclipse.jetty.http.HttpParser:非法 state = 0x16 in state = START for buffer HeapByteBuffer @ 86064c8 [P = 1,L = 118,C = 8192,R = 117] = {\ X16<<< \ X03 \ X00 \ x00q \ X01 \ X00 \ x00m \ X03 \ x00V] \ XA4 \ XC1 \ XAE \ x9a \ XEF ... \ X15 \ X00 \ X12 \ X00 \ X03 \ X00 \ X08 \ X00 \ X14 \ X00 \ X11 \ X00 \ XFF \ X01 \ X00>>&GT,E \ r \ n \ [R \ n \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00 \ X00} WARN [2015-12-01 13:45:43,496] org.eclipse.jetty.http.HttpParser: badMessage:400非法字符0x16表示 HttpChannelOverHttp @ 6fdc750b {R = 0,C =假,A = IDLE,URI = - }
我能做什么?
答案 0 :(得分:3)
在我启动并运行之前,安装TextSecure服务器给我带来了一些麻烦。 主要部分是websocket资源部分(你有点想通了)。 从错误中看,您的推送服务器似乎无法正常访问和配置。看看我的writeup,看看这是否有帮助。 推送服务器和textsecure服务的配置部分非常重要,可能会给您留下混乱的包。
git clone https://github.com/lucaconte/Signal-Server.git
git clone https://github.com/lucaconte/PushServer.git
git clone https://github.com/lucaconte/WebSocket-Resources.git
capsule.maven.plugin.version
版本更改为1.0.1
mvn clean install
https://www.gpg4win.org/download.html : https://files.gpg4win.org/gpg4win-vanilla-2.3.3.exe
GNUPGHOME : c:\Users\<username>\AppData\Roaming\gnupg //or whatever path it is
secring
和pubring
mvn clean install
mvn install:install-file -Dfile=./library/target/websocket-resources-0.4.1.jar -DgroupId=org.whispersystems -DartifactId=websocket-resources -Dversion=0.4.1 -Dpackaging=jar
mvn clean install -DskipTests
pushserver.yml
redis:
url: redis://localhost:6379/2
authentication:
servers:
-
name: 123
password: 123
gcm:
xmpp: false
apiKey: <INPUT HERE>
senderId: <INPUT HERE>
redphoneApiKey: AIddSyAsviyMy8jKe8chCEfr8NbeqGghy7oOCi4 #fake
apn:
feedback: false
pushKey: /path/to/your/apnpushcertificates/apns-dev-key-noenc.pem #fake
voipKey: /path/to/your/apnpushcertificates/apns-dev-key-noenc.pem #fake
voipCertificate: /path/to/your/apnpushcertificates/apns-dev-cert.pem #fake
pushCertificate: /path/to/your/apnpushcertificates/apns-dev-cert.pem #fake
server:
applicationConnectors:
- type: http
port: 9090
adminConnectors:
- type: http
port: 9091
gzip:
enabled: true
logging:
level: INFO
appenders:
- type: file
currentLogFilename: /tmp/pushserver.log
archivedLogFilenamePattern: /tmp/pushserver-%d.log.gz
archivedFileCount: 5
- type: console
# This is the sample config/textsecure.yml file for the TextSecure Server
# Pay attention! To start TextSecur server you will need to install and start PushServer
twilio:
accountId: <INPUT HERE>
accountToken: <INPUT HERE>
numbers:
-
+33756796138 #fake
localDomain: foo.org
push:
host: localhost
port: 9090
username: 123
password: 123
s3:
accessKey: ABCDEFGCUFYDHVM2LXXX #fake
accessSecret: W0UfGDddfAbqYyCTIIbSQlDtreTGokOs0OTpL0SE #fake
attachmentsBucket: thenameofyouts3buket #fake
directory:
url: "redis://localhost:6379/0"
cache:
url: "redis://localhost:6379/1"
server:
applicationConnectors:
- type: http
port: 8080
#keyStorePath: config/example.keystore
#keyStorePassword: example
#validateCerts: true
adminConnectors:
- type: http
port: 8081
#keyStorePath: config/example.keystore
#keyStorePassword: example
#validateCerts: true
websocket:
enabled: true
messageStore: # Postgres database configuration for message store
driverClass: org.postgresql.Driver
user: "postgres"
password: "postgres"
url: "jdbc:postgresql://localhost:5432/messagedb"
database:
driverClass: org.postgresql.Driver
user: "postgres"
password: "postgres"
url: "jdbc:postgresql://localhost:5432/accountsdb"
properties:
charSet: UTF-8
#federation: # is disabled
logging:
level: INFO
appenders:
- type: file
currentLogFilename: /tmp/textsecureshserver.log
archivedLogFilenamePattern: /temp/textsecureserver-%d.log.gz
archivedFileCount: 5
- type: console
redphone:
authKey: 1234567890 #fake
将pushserver.yml放在推送服务器文件夹中 将textsecure.yml放在Text Sexure / config文件夹中。
答案 1 :(得分:0)
仅对于消息传递服务,您需要安装PushServer并成功启动它。要成功启动它,您需要创建Google开发人员帐户,Apple开发人员帐户并获取推送凭据以发送推送通知。
在TextSecure服务器中,您需要像这样配置推送服务器:
push: host: 192.168.10.10 port: 8080 username: 123 password: 123
authentication: servers: - name: 123 password: 123