Skip to content

Commit 5972794

Browse files
committed
Merge branch 'release-0.28'
2 parents 9f3376b + 33356f4 commit 5972794

File tree

88 files changed

+26304
-12420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+26304
-12420
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ vendor/*
1919
/build/out/
2020
/.sass-cache
2121
/extra
22+
/extra.d
2223
/src/i18n/*.mo
2324
server.key
2425
server.csr

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
language: go
44

55
go:
6-
- 1.3
76
- 1.4
87
- 1.5
98
- 1.6
9+
- tip
10+
11+
matrix:
12+
allow_failures:
13+
- go: tip
1014

1115
env:
1216
- GEM_HOME=/var/lib/gems/1.9.1

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Leon Klingele <[email protected]>
1010

1111
Translation:
1212
Curt Frisemo <[email protected]>
13+
Irek Zaripov <[email protected]>

CHANGELOG.md

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
## 0.28.0
2+
3+
* Update Git hooks, to auto check translations
4+
* Fix a bunch of translations, after checks found issues
5+
6+
7+
## 0.27.2
8+
9+
* Update -X arguments syntax
10+
* Add Docker instructions to README.md
11+
* Add Dockerfiles to build minimal Docker
12+
* Check .po files before committing.
13+
* Added script to check style of .po files.
14+
* Fixed various style issues in .po files.
15+
* Allow custom GOROOT to make Travis happy
16+
* Unset GOROOT and GOBIN in Makefile
17+
* Update Dockerfile to make sense
18+
* Bump go.uuid to 1.1.0
19+
* Add Go tip to travis (allowed to fail)
20+
* Bump Go requirement to 1.4
21+
* Update gorilla websocket build dependency
22+
23+
24+
## 0.27.1
25+
26+
* Compute 'extra.d' relative URL
27+
* Compare HMACs in constant time to mitigate timing attack
28+
* Use proper variable for extra.d folder detection
29+
* Add support for symlinks inside extra.d
30+
31+
32+
## 0.27.0
33+
34+
* Stop to use window.alert() for load errors
35+
* Add support for extra.d directory
36+
* Hide "call" button when in conference rooms. In conference rooms, everybody automatically calls each other, so there is no need for an explicit "Call" button.
37+
* Only install git hook if cloned from git. For source tarballs, the `.git/hooks` folder does not exist, so an error is shown when running `autogen.sh`. With this change, the hook is not installed in such cases.
38+
* Added API to leave a room. Previously it was only possible to leave a room by switching to another room. This change allows explicitly leaving a room without re-joining.
39+
* Make the room type configurable through NATS.
40+
* Include user status in "Joined" event. Previously, each user broadcasted the status after a "Room" event was received. This caused a short time for all other participants where the buddy list showed "Participant X" instead of the real user name.
41+
* Fix moving between conference rooms.
42+
* Try to recover from (some) lost p2p connection state. When the ICE connection state changes to "disconnected"/"failed", these calls are marked and get re-called for conferences once the connection is back and are allowed to send an "Offer" again. This works in cases where the complete connectivity is lost for one client while being in a conference once it comes back afterwards for him. Doesn't work reliably on Firefox as no "disconnected"/"failed" is triggered there.
43+
* Don't add dummy remote streams if call is closed.
44+
* Don't show "failed" error if connection was established before.
45+
* Major refactoring of call / conference handling. Removed difference between single peer-to-peer calls and conferences with multiple peers. There is only a single code path now that creates calls and stores them in a conference (which holds all active calls). With this also fixed some timing issues that could cause conference peers to not send or receive media streams.
46+
* Remove keygen usage from web client, effectlively removing certificate creation through web client (fixes #274).
47+
* Update AngularJS to 1.5.6
48+
* Update angular-ui-bootstrap to 0.13.4.
49+
* Update angular.js to 1.4.6.
50+
* Moved room type name to variable.
51+
* Move room type names to constants and don't expose roomworker properties.
52+
* Reverse data in session ids.
53+
* Also send "Conference" message after "Room" messages.
54+
* Don't send "Conference" event if user couldn't join room.
55+
* Use "safeApply" when handling webrtc done/stop events.
56+
* Always show own video when in conference room.
57+
* Also hide other hangup buttons in conference rooms.
58+
* Hide "Hangup" button in conferences.
59+
* Implement new API for tests.
60+
* Updated evaluation of Conference messages to support serverside conferences.
61+
* Add CSS class with current room type to body including helpers to show/hide elements.
62+
* Evaluate room type mapping and send Conference messages for conference rooms. The messages are trigger whenever a new user joins a conference room. For such rooms, clientside Conference messages are ignored.
63+
* Make mapping of room name to room type configurable.
64+
* Fixed wrong attribute name. Also use cached variable instead of performing attribute lookup.
65+
* Fixed updating state if a conference gets downgraded to p2p.
66+
* Fixed inconsistent PeerConference creation. There was a case where a three-party conference got downgraded to a p2p session and then upgraded to a three-party conference again, that the two remaining participants created their own PeerConference object resulting in a "split-brain" conference.
67+
* Move stream id creation to PeerCall. That way the streams can be registered internally and properly cleaned up on hangup.
68+
* spelling
69+
* Added translation for Russian
70+
71+
172
## 0.26.0
273

374
* Remove go-tip from travis until it works again.
@@ -639,5 +710,3 @@
639710
## 0.15.0
640711

641712
* Initial public release.
642-
643-

Dockerfile

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Spreed WebRTC server in Docker
1+
# Spreed WebRTC server in Docker (for development)
22
#
33
# This Dockerfile creates a container which runs Spreed WebRTC as found in the
44
# current folder. It is intended for development.
@@ -21,8 +21,8 @@
2121
# when running the docker container as with `-c` parameter like this:
2222
#
2323
# ```
24-
# docker run --rm --name my-spreed-webrtc -p 8080:8080 \
25-
# -v `pwd`:/srv/extra -i -t spreed-webrtc` \
24+
# docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
25+
# -v `pwd`:/srv/extra -i -t spreed-webrtc \
2626
# -c /srv/extra/server.conf
2727
# ```
2828
#
@@ -45,49 +45,29 @@ ENV DEBIAN_FRONTEND noninteractive
4545

4646
# Base build dependencies.
4747
RUN apt-get update && apt-get install -qy \
48-
golang nodejs build-essential git automake autoconf
48+
golang \
49+
nodejs \
50+
build-essential \
51+
git \
52+
automake \
53+
autoconf
4954

5055
# Add and build Spreed WebRTC server.
5156
ADD . /srv/spreed-webrtc
5257
WORKDIR /srv/spreed-webrtc
53-
RUN ./autogen.sh && ./configure && make pristine && make get && make
58+
RUN ./autogen.sh && \
59+
./configure && \
60+
make pristine && \
61+
make get && \
62+
make
5463

55-
# Create entrypoint script.
56-
RUN echo '\n\
57-
set -e\n\
58-
if [ "$NEWCERT" = "1" -o ! -e /srv/cert.pem ]; then\n\
59-
echo "Creating new self signed TLS certificate ..."\n\
60-
rm -f /srv/privkey.pem\n\
61-
rm -f /srv/cert.pem\n\
62-
openssl ecparam -genkey -name secp384r1 -out /srv/privkey.pem\n\
63-
openssl req -new -x509 -key /srv/privkey.pem \\\n\
64-
-out /srv/cert.pem -days 3650 \\\n\
65-
-subj /CN=spreed-webrtc \\\n\
66-
-config /etc/ssl/openssl.cnf \\\n\
67-
-sha256 -extensions v3_req\n\
64+
# Add runtime dependencies.
65+
RUN apt-get update && apt-get install -qy \
66+
bsdmainutils \
67+
openssl
6868

69-
fi\n\
70-
echo "TLS certificate:"\n\
71-
openssl x509 -in /srv/cert.pem -text\n\
72-
if [ "$NEWSECRETS" = "1" -o ! -e /srv/secrets.conf ]; then\n\
73-
echo "Creating new server secrets ..."\n\
74-
rm -f /srv/secrets.conf.tmp\n\
75-
echo "SESSION_SECRET=$(openssl rand -hex 32)" >>/srv/secrets.conf.tmp\n\
76-
echo "ENCRYPTION_SECRET=$(openssl rand -hex 32)" >>/srv/secrets.conf.tmp\n\
77-
echo "SERVER_TOKEN=$(openssl rand -hex 32)" >>/srv/secrets.conf.tmp\n\
78-
echo "SHARED_SECRET=$(openssl rand -hex 32)" >>/srv/secrets.conf.tmp\n\
79-
. /srv/secrets.conf.tmp\n\
80-
sed -i -e "s/sessionSecret =.*/sessionSecret = $SESSION_SECRET/" /srv/spreed-webrtc/default.conf\n\
81-
sed -i -e "s/encryptionSecret =.*/encryptionSecret = $ENCRYPTION_SECRET/" /srv/spreed-webrtc/default.conf\n\
82-
sed -i -e "s/serverToken =.*/serverToken = $SERVER_TOKEN/" /srv/spreed-webrtc/default.conf\n\
83-
sed -i -e "s/;sharedsecret_secret =.*/sharedsecret_secret = $SHARED_SECRET/" /srv/spreed-webrtc/default.conf\n\
84-
mv /srv/secrets.conf.tmp /srv/secrets.conf\n\
85-
fi\n\
86-
echo "Server secrets:"\n\
87-
cat /srv/secrets.conf\n\
88-
echo "Staring Spreed WebRTC server ..."\n\
89-
exec /srv/spreed-webrtc/spreed-webrtc-server "$@"\n'\
90-
>> /srv/entrypoint.sh
69+
# Add entrypoint.
70+
COPY scripts/docker_entrypoint.sh /srv/entrypoint.sh
9171

9272
# Create default config file.
9373
RUN cp -v /srv/spreed-webrtc/server.conf.in /srv/spreed-webrtc/default.conf && \

Dockerfile.build

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Spreed WebRTC server Docker builder
2+
#
3+
# This Dockerfile creates a container which builds Spreed WebRTC as found in the
4+
# current folder, and creates a tarball which can be piped into another Docker
5+
# container for creating minimal sized Docker containers.
6+
#
7+
# First create the builder image:
8+
#
9+
# ```
10+
# docker build -t spreed-webrtc-builder -f Dockerfile.build .
11+
# ```
12+
# Next run the builder container, piping its output into the creation of the
13+
# runner container. This creates a minimal size Docker image which can be used
14+
# to run Spreed WebRTC in production.
15+
#
16+
# ```
17+
# docker run --rm spreed-webrtc-builder | docker build -t spreed-webrtc -f Dockerfile.run -
18+
# ```
19+
20+
FROM ubuntu:xenial
21+
MAINTAINER Simon Eisenmann <[email protected]>
22+
23+
# Set locale.
24+
RUN locale-gen --no-purge en_US.UTF-8
25+
ENV LC_ALL en_US.UTF-8
26+
27+
ENV DEBIAN_FRONTEND noninteractive
28+
29+
# Base build dependencies.
30+
RUN apt-get update && apt-get install -qy \
31+
golang \
32+
nodejs \
33+
build-essential \
34+
git \
35+
automake \
36+
autoconf
37+
38+
# Add and build Spreed WebRTC server.
39+
ADD . /srv/spreed-webrtc
40+
WORKDIR /srv/spreed-webrtc
41+
RUN mkdir -p /usr/share/gocode/src
42+
RUN ./autogen.sh && \
43+
./configure && \
44+
make pristine && \
45+
make get && \
46+
make tarball
47+
RUN rm /srv/spreed-webrtc/dist_*/*.tar.gz
48+
RUN mv /srv/spreed-webrtc/dist_*/spreed-webrtc-* /srv/spreed-webrtc/dist
49+
50+
# Add gear required by Dockerfile.run.
51+
COPY Dockerfile.run /
52+
COPY scripts/docker_entrypoint.sh /
53+
54+
# Running this image produces a tarball suitable to be piped into another
55+
# Docker build command.
56+
CMD tar -cf - -C / Dockerfile.run docker_entrypoint.sh /srv/spreed-webrtc/dist

Dockerfile.run

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Spreed WebRTC server in minimal Docker (for production)
2+
#
3+
# This Dockerfile creates a container which builds Spreed WebRTC as piped in
4+
# on stdin using another Docker container defined in `Dockerfile.build`.
5+
#
6+
# First create the builder image:
7+
#
8+
# ```
9+
# docker build -t spreed-webrtc-builder -f Dockerfile.build .
10+
# ```
11+
#
12+
# Next run the builder container, piping its output into the creation of the
13+
# runner container:
14+
#
15+
# ```
16+
# docker run --rm spreed-webrtc-builder | docker build -t spreed-webrtc -f Dockerfile.run -
17+
# ```
18+
#
19+
# image. Afterwards run the container like this:
20+
#
21+
# ```
22+
# docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
23+
# -v `pwd`:/srv/extra -i -t spreed-webrtc
24+
# ```
25+
#
26+
# Now you can either use a frontend proxy like Nginx to provide TLS to Spreed
27+
# WebRTC and even run it in production like that from the Docker container, or
28+
# for easy development testing, the container also provides a TLS listener with
29+
# a self-signed certificate on port 8443.
30+
#
31+
# To use custom configuration, use the `server.conf.in` file as template and
32+
# remove the listeners from [http] and [https] sections. Then provide that file
33+
# when running the docker container as with `-c` parameter like this:
34+
#
35+
# ```
36+
# docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
37+
# -v `pwd`:/srv/extra -i -t spreed-webrtc \
38+
# -c /srv/extra/server.conf
39+
# ```
40+
#
41+
# And last, this container checks environment variables NEWCERT and NEWSECRETS,
42+
# on startup. Set those to `1` to regenerate the corresponding values on start.
43+
# The current certificate and secrets are printed before startup so you can use
44+
# them easily for other services. Of course, if you want to have persistent cert
45+
# and secrets, the container needs to be persistent in the first place, so no
46+
# `--rm` parameter in the example from above in that case.
47+
#
48+
49+
FROM frolvlad/alpine-glibc:alpine-3.3_glibc-2.23
50+
MAINTAINER Simon Eisenmann <[email protected]>
51+
52+
ENV LANG=C.UTF-8
53+
54+
# Add dependencies.
55+
RUN apk add --no-cache \
56+
openssl
57+
58+
# Add Spreed WebRTC as provided by Dockerfile.run.
59+
COPY srv/ /srv
60+
61+
# Move around stuff from tarball to their expected locations.
62+
RUN mv /srv/spreed-webrtc/dist/loader/* /srv/spreed-webrtc && \
63+
mv /srv/spreed-webrtc/dist/www/html /srv/spreed-webrtc && \
64+
mv /srv/spreed-webrtc/dist/www/static /srv/spreed-webrtc
65+
66+
# Add entrypoint.
67+
COPY docker_entrypoint.sh /srv/entrypoint.sh
68+
69+
# Create default config.
70+
RUN cp -v /srv/spreed-webrtc/server.conf.in /srv/spreed-webrtc/default.conf && \
71+
sed -i 's|listen = 127.0.0.1:8080|listen = 0.0.0.0:8080|' /srv/spreed-webrtc/default.conf && \
72+
sed -i 's|;root = .*|root = /srv/spreed-webrtc|' /srv/spreed-webrtc/default.conf && \
73+
sed -i 's|;listen = 127.0.0.1:8443|listen = 0.0.0.0:8443|' /srv/spreed-webrtc/default.conf && \
74+
sed -i 's|;certificate = .*|certificate = /srv/cert.pem|' /srv/spreed-webrtc/default.conf && \
75+
sed -i 's|;key = .*|key = /srv/privkey.pem|' /srv/spreed-webrtc/default.conf && \
76+
touch /etc/spreed-webrtc-server.conf
77+
78+
# Cleanup.
79+
RUN rm -rf /tmp/* /var/cache/apk/*
80+
81+
# Add mount point for extra things.
82+
RUN mkdir /srv/extra
83+
VOLUME /srv/extra
84+
85+
# Tell about our service.
86+
EXPOSE 8080
87+
EXPOSE 8443
88+
89+
# Define entry point with default command.
90+
ENTRYPOINT ["/bin/sh", "/srv/entrypoint.sh", "-dc", "/srv/spreed-webrtc/default.conf"]
91+
CMD ["-c", "/etc/spreed-webrtc-server.conf"]

Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
AUTOMAKE_OPTIONS = -Wno-portability
2222
ACLOCAL_AMFLAGS = -I m4
2323

24+
unexport GOBIN
25+
2426
EXENAME := spreed-webrtc-server
2527
GOPKG := github.com/strukturag/spreed-webrtc
2628
GOPATH := "$(CURDIR)/vendor:$(CURDIR)"
@@ -132,7 +134,7 @@ update-i18n:
132134
cd $(CURDIR)/src/i18n && $(MAKE) update
133135

134136
release-binary: GOPATH = "$(DIST):$(CURDIR)/vendor:$(CURDIR)"
135-
release-binary: INTERNALLDFLAGS = -X main.version $(PACKAGE_VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE)
137+
release-binary: INTERNALLDFLAGS = -X main.version=$(PACKAGE_VERSION) -X main.defaultConfig=$(CONFIG_PATH)/$(CONFIG_FILE)
136138
release-binary: OUTPUT = $(DIST_BIN)
137139
release-binary: dist_gopath $(DIST_BIN) binary
138140

0 commit comments

Comments
 (0)