This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/peerconnection/client/linux/main_wnd.cc b/examples/peerconnection/client/linux/main_wnd.cc | |
index 2be75d8f8d..a1581c67d5 100644 | |
--- a/examples/peerconnection/client/linux/main_wnd.cc | |
+++ b/examples/peerconnection/client/linux/main_wnd.cc | |
@@ -429,8 +429,10 @@ void GtkMainWnd::OnRedraw() { | |
width_ = remote_renderer->width(); | |
height_ = remote_renderer->height(); | |
- if (!draw_buffer_.get()) { | |
- draw_buffer_size_ = (width_ * height_ * 4) * 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/peerconnection/client/conductor.cc b/examples/peerconnection/client/conductor.cc | |
index 965525abff..75027ca17e 100644 | |
--- a/examples/peerconnection/client/conductor.cc | |
+++ b/examples/peerconnection/client/conductor.cc | |
@@ -297,6 +297,14 @@ void Conductor::OnPeerDisconnected(int id) { | |
} | |
void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) { | |
+ if (!signaling_thread_.get()) { | |
+ signaling_thread_ = rtc::Thread::CreateWithSocketServer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The first two global and default sections | |
# are just the ones present by default in the config file | |
# We leave these unchanged | |
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute firewall-rules create challenge-name \ | |
--allow tcp:30001 \ | |
--priority 1000 \ | |
--target-tags challenges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: challenge-name # REPLACE challenge-name and challenge-category to your challenges's name and category | |
labels: | |
category: challenge-category # We assign labels to the deployment to link it to a service later, and to help manage deployments | |
challenge: challenge-name | |
spec: | |
replicas: 3 # The no of replicas sets the no of instances/pods of the challenge deployed on the cluster | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud container clusters create cluster-name \ | |
--zone compute-zone \ | |
--machine-type <machine-type you chose> \ | |
--num-nodes <number of nodes in the cluster> \ | |
--tags challenges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add apt sources | |
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | |
# Install deps | |
sudo apt-get install apt-transport-https ca-certificates gnupg | |
# Import google cloud public key | |
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | |
# Update apt package index, install cloud sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install certbot python3-certbot-nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s; | |
limit_conn_zone $binary_remote_addr zone=addr:10m; | |
server { | |
server_name mydomain.com; | |
limit_req zone=mylimit burst=15; | |
limit_conn addr 10; | |
limit_req_status 429; | |
client_max_body_size 8M; | |
location / { | |
proxy_pass http://localhost:8000; |
NewerOlder