EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

股


  1. 每季報告
    • 第四季:因為明年3月才會公布財報,所以第三季公佈後到明年3月,近半年時間,是沒有任何依據,第3季公佈成績好,自然可以撐到明年3月,公佈成績不好,也是同樣不好到明年3月,除非有特殊情況,否則沒人看第四季的。
  2. 外資
    • 在大洗盤,把散戶洗走:外資看好這支股票,為了增加獲利,壓低股價,嚇散戶自願出場,買下低成本股票,增加持有股數,等待最終獲利。 
    • 這段期間不可能讓成本上升,就算上升也會想盡辨法壓低,如果壓不下來,外資持有成本也同樣壓不下來,獲利就不能提高。
    • 一般散戶受不了壓力,就直接出場,因為這是長時間,非短期操作。
    • 要補單要在大盤情況也不好大跌跟補單

nginx proxy pass [ best practices ] 2 for sysctl tcp

.https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/



http://www.queryadmin.com/1654/tuning-linux-kernel-tcp-parameters-sysctl/

https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/
Don't USE

net.ipv4.tcp_tw_recycle=1
—don’t use it—it was already broken for users behind NAT, but if you upgrade your kernel, it will be broken for everyone.

net.ipv4.tcp_timestamps=0
—don’t disable them unless you know all side-effects and you are OK with them. For example, one of non-obvious side effects is that you will loose window scaling and SACK options on syncookies.



https://read01.com/zh-tw/KBgmj7.html
Don't USE

net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1  /*Only you know, sometime can do*/



***********sysctl**************
net.ipv4.tcp_mtu_probing=1

# Increase number of max open-files
fs.file-max = 150000

# Increase max number of PIDs
kernel.pid_max = 4194303

# Increase range of ports that can be used
net.ipv4.ip_local_port_range = 1024 65535

# https://tweaked.io/guide/kernel/
# Forking servers, like PostgreSQL or Apache, scale to much higher levels of concurrent connections if this is made larger
kernel.sched_migration_cost_ns=5000000

# https://tweaked.io/guide/kernel/
# Various PostgreSQL users have reported (on the postgresql performance mailing list) gains up to 30% on highly concurrent workloads on multi-core systems
kernel.sched_autogroup_enabled = 0

# https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance
# Avoid falling back to slow start after a connection goes idle
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_no_metrics_save=0

# https://github.com/ton31337/tools/wiki/Is-net.ipv4.tcp_abort_on_overflow-good-or-not%3F
net.ipv4.tcp_abort_on_overflow=0

# Enable TCP window scaling (enabled by default)
# https://en.wikipedia.org/wiki/TCP_window_scale_option
net.ipv4.tcp_window_scaling=1

# Enables fast recycling of TIME_WAIT sockets.
# (Use with caution according to the kernel documentation!)
#net.ipv4.tcp_tw_recycle = 1

# Allow reuse of sockets in TIME_WAIT state for new connections
# only when it is safe from the network stack’s perspective.
#net.ipv4.tcp_tw_reuse = 1

# Turn on SYN-flood protections
net.ipv4.tcp_syncookies=1

# Only retry creating TCP connections twice
# Minimize the time it takes for a connection attempt to fail
net.ipv4.tcp_syn_retries=2
net.ipv4.tcp_synack_retries=2
net.ipv4.tcp_orphan_retries=2

# How many retries TCP makes on data segments (default 15)
# Some guides suggest to reduce this value
net.ipv4.tcp_retries2=8

# Optimize connection queues
# https://www.linode.com/docs/web-servers/nginx/configure-nginx-for-optimized-performance
# Increase the number of packets that can be queued
net.core.netdev_max_backlog = 3240000
# Max number of "backlogged sockets" (connection requests that can be queued for any given listening socket)
net.core.somaxconn = 50000
# Increase max number of sockets allowed in TIME_WAIT
net.ipv4.tcp_max_tw_buckets = 1440000
# Number of packets to keep in the backlog before the kernel starts dropping them
# A sane value is net.ipv4.tcp_max_syn_backlog = 3240000
net.ipv4.tcp_max_syn_backlog = 3240000

# TCP memory tuning
# View memory TCP actually uses with: cat /proc/net/sockstat
# *** These values are auto-created based on your server specs ***
# *** Edit these parameters with caution because they will use more RAM ***
# Changes suggested by IBM on https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Welcome%20to%20High%20Performance%20Computing%20%28HPC%29%20Central/page/Linux%20System%20Tuning%20Recommendations
# Increase the default socket buffer read size (rmem_default) and write size (wmem_default)
# *** Maybe recommended only for high-RAM servers? ***
net.core.rmem_default=16777216
net.core.wmem_default=16777216
# Increase the max socket buffer size (optmem_max), max socket buffer read size (rmem_max), max socket buffer write size (wmem_max)
# 16MB per socket - which sounds like a lot, but will virtually never consume that much
# rmem_max over-rides tcp_rmem param, wmem_max over-rides tcp_wmem param and optmem_max over-rides tcp_mem param
net.core.optmem_max=16777216
net.core.rmem_max=16777216
net.core.wmem_max=16777216
# Configure the Min, Pressure, Max values (units are in page size)
# Useful mostly for very high-traffic websites that have a lot of RAM
# Consider that we already set the *_max values to 16777216
# So you may eventually comment these three lines
net.ipv4.tcp_mem=16777216 16777216 16777216
net.ipv4.tcp_wmem=4096 87380 16777216
net.ipv4.tcp_rmem=4096 87380 16777216

# Keepalive optimizations
# By default, the keepalive routines wait for two hours (7200 secs) before sending the first keepalive probe,
# and then resend it every 75 seconds. If no ACK response is received for 9 consecutive times, the connection is marked as broken.
# The default values are: tcp_keepalive_time = 7200, tcp_keepalive_intvl = 75, tcp_keepalive_probes = 9
# We would decrease the default values for tcp_keepalive_* params as follow:
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 9

# The TCP FIN timeout belays the amount of time a port must be inactive before it can reused for another connection.
# The default is often 60 seconds, but can normally be safely reduced to 30 or even 15 seconds
# https://www.linode.com/docs/web-servers/nginx/configure-nginx-for-optimized-performance
net.ipv4.tcp_fin_timeout = 7


***********sysctl**************


==PS==
.net.ipv4.tcp_slow_start_after_idle & net.ipv4.tcp_no_metrics_save
https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance




bbr Kernel 4.9.51

aws linux 官方

https://aws.amazon.com/tw/amazon-linux-ami/2017.09-release-notes/



ubuntu

https://segmentfault.com/a/1190000008395823
https://farer.org/2017/05/18/build-kernel-with-bbr-on-ec2-amazon-linux/

修改/etc/sysctl.conf文件,加入如下两行:

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr





檢查

cat /proc/sys/net/ipv4/tcp_congestion_control

雞肉 炸

張安爾 雞肉切太大塊了。差不多骰子牛肉大小。雞肉醃好裹地瓜粉(不需要返潮)油溫180度時雞肉丟下去快速撥開撥散後撈起放一下。等油溫再回到180時再回炸一分鐘就好 要起鍋時再丟九層塔下去一秒就可以了

完了 教會你們我就要失業了🤣⋯⋯

10G

https://www.pcdvd.com.tw//showthread.php?t=1137311

https://world.taobao.com/item/546382206714.htm?spm=a312a.7700714.0.0.7060fa67elnvUR#detail

[轉]vga

https://www.mobile01.com/topicdetail.php?f=232&t=5312570&p=2#17



move to ionic3

1、update every things to ionic3  uninstall, install , update npm....etc

2、use ionic 3, create new project, run, sure can run on android.

3、copy old config.xml data to new config.xml

4、change new project src -> src1, then copy old project src.

4.1、 code have any  ionic-native  change @ionic-native/xxxxxxxxx

4.2 、src/app/app.module.ts

.top add import { BrowserModule } from '@angular/platform-browser';

.import、providers same 4.1


4.3、copy new project src/index.html 、 src/service-worker.js

then try   ionic cordova android --emulator


[轉]在大陸來往近10年定居5年,而去年我回台灣了。

https://www.mobile01.com/topicdetail.php?f=651&t=5310046

https://www.mobile01.com/topicdetail.php?f=651&t=5310046#10

https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=2#11

https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=2#14

https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=2#15


https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=3#26

https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=4#40

https://www.mobile01.com/topicdetail.php?f=651&t=5310046&p=18#176

nginx proxy pass [ best practices ]

1、/etc/nginx/nginx.conf

worker_processes 1; #auto;


events {
        worker_connections 3000;  #786;
        # multi_accept on;
}


http {

        server_tokens off;  #open this line
        resolver 8.8.8.8 8.8.4.4 valid=300s;  #resolver dns server

        proxy_cache_path          /var/cache/proxy-nginx levels=1:2 keys_zone=proxy-cache:10m max_size=3g inactive=1d use_temp_path=off;

        add_header X-Cache $upstream_cache_status; #讓Header顯示是否有Cache:HIT命中 MISS失敗  BYPASS略過

        proxy_headers_hash_max_size 51200;  #add this line
        proxy_headers_hash_bucket_size 6400;  #add this line

        log_format  main  '$remote_addr $status $request $body_bytes_sent [$time_local]  $http_user_agent $http_referer  $http_x_forwarded_for $upstream_addr $upstream_status $upstream_cache_status $upstream_response_time';
        access_log /var/log/nginx/access.log main buffer=1m;   #or maybe note # because disk space

        log_format cache_status '[$time_local] "$request" $upstream_cache_status';
        access_log /var/log/nginx/cache_access.log  cache_status;
        

        gzip_proxied any;  #open this line, because CDN




2、/etc/nginx/proxy_params      put all or maybe find document for practices

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;

client_max_body_size 100M;
client_body_buffer_size 1m;
proxy_intercept_errors on;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 256 16k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_max_temp_file_size 0;
proxy_read_timeout 300;

------------------
#slice 1m; # for slice_range
proxy_cache_key $scheme$host$proxy_host$request_uri;  # $slice_range
#proxy_cache_key "$scheme://$host$request_uri";
#proxy_cache_key $host:$server_port$uri$is_args$args; #通过key来hash,定义KEY的值

#proxy_cache_valid 15m;
proxy_cache_valid 200 301 302 304 1h; #206 -> slice_range
proxy_cache_valid 404 1m;
proxy_cache_valid any 1m;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_set_header Range $slice_range; #for slice_range
proxy_cache_revalidate on;

# Set some good timeouts
proxy_connect_timeout       300;
proxy_send_timeout          300;
proxy_read_timeout          300;
send_timeout                300;

#proxy_cache_min_uses 3; #只要统一个url,在磁盘文件删除之前,总次数访问到达3次,就开始缓存。
proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment; # 如果任何一个参数值不为空,或者不等于0,nginx就不会查找缓存,直接进行代理转发

------------------
aio threads;
aio_write on;
------------------
open_file_cache max=10000;
open_file_cache_min_uses 2;
open_file_cache_errors on;



2.1、SSL
./etc/nginx/snippets/ssl-example.com.conf

ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; #crt
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; #key


./etc/nginx/snippets/ssl-params.conf

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
#resolver 8.8.8.8 8.8.4.4 valid=300s;  #move to nginx.conf http
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;


3、/etc/nginx/sites-available/default


# Default server configuration

#server1
server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';  #destination host ip
        set $ds_hostname 'ooo.ooo.ooo.ooo'; #destination hostname

        listen 80 reuseport;
        #listen [::]:80 default_server;

        #root /var/www/html;
        #index index.html index.htm index.nginx-debian.html;
        #server_name _;

        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                proxy_pass http://$ds_hostname:$server_port;
                include /etc/nginx/proxy_params;
                
                #try_files $uri $uri/ =404;
        }


        location /nginx_status { 
                stub_status on; 
                access_log off; 
        }
}

server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';
        set $ds_hostname 'ooo.ooo.ooo.ooo';


    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name example.com www.example.com;


        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                proxy_pass http://$ds_hostname:$server_port;
                include /etc/nginx/proxy_params;
}

location /nginx_status {
stub_status on;
access_log off;
}

    include snippets/ssl-example.com.conf;
    include snippets/ssl-params.conf;

}

#server2
server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';
        listen 8881 reuseport;

        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                
                include /etc/nginx/proxy_params;
        }
}

#server3
server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';
        listen 3333 reuseport;

        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                
                include /etc/nginx/proxy_params;
        }
}

server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';
        listen 81 reuseport;

        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                
                include /etc/nginx/proxy_params;
        }
}                      

server {
        set $ds_host_ip  'xxx.xxx.xxx.xxx';
        listen 8080 reuseport;

        location / {
                proxy_pass http://$ds_host_ip:$server_port;
                include /etc/nginx/proxy_params;
        }
}


=====  =====
/etc/security/limits.conf
* soft nproc 65535 
* hard nproc 65535 
* soft nofile 65535 
* hard nofile 65535

echo "net.core.somaxconn=1024" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf

echo "net.ipv4.ip_forward=0" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf


===== =====

iptables限制tcp连接和频率

#单个IP在60秒内只允许新建20个连接
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 20 --name DEFAULT --rsource -j DROP
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW -m recent --set --name DEFAULT --rsource

#控制单个IP的最大并发连接数为20
-I INPUT -p tcp --dport 80 -m connlimit  --connlimit-above 20 -j REJECT

#每个IP最多20个初始连接
-A INPUT -p tcp --syn -m connlimit --connlimit-above 20 -j DROP



http://seanlook.com/2015/05/17/nginx-location-rewrite/
http://xyz.cinc.biz/2016/06/nginx-if-and-host-get-variable.html
http://siwei.me/blog/posts/nginx-built-in-variables

https://www.52os.net/articles/nginx-anti-ddos-setting.html
https://www.52os.net/articles/nginx-anti-ddos-setting-2.html

https://gagor.pl/2016/01/optimize-nginx-for-performance/

------------------
https://gryzli.info/2017/05/09/nginx-configuring-reverse-proxy-caching/
https://www.nginx.com/blog/nginx-high-performance-caching/
https://guides.wp-bullet.com/how-to-configure-nginx-reverse-proxy-wordpress-cache-apache/
https://tweaked.io/guide/nginx-proxying/
http://www.jianshu.com/p/625c2b15dad5
http://phl.iteye.com/blog/2256857
https://gist.github.com/regadas/7381125


https://calomel.org/nginx.html

Building the Nginx Reverse Proxy example

make clean; ./configure --with-file-aio --without-http_autoindex_module --without-http_browser_module --without-http_geo_module --without-http_empty_gif_module --without-http_map_module --without-http_memcached_module --without-http_userid_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_split_clients_module --without-http_uwsgi_module --without-http_scgi_module --without-http_referer_module --without-http_upstream_ip_hash_module && make && make install



----------------------------------------------
.https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/

Deploying Brotli for static content
cloudflare/ngx_brotli_module  https://github.com/cloudflare/ngx_brotli_module

https://www.mobile01.com/topicdetail.php?f=506&t=5147355

--auto nginx mod CENTMIN MOD
https://centminmod.com/


.https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/


https://cipherli.st/

On ssl_session_tickets dropbox & cipherli.st have different way............. maybe use cipherli.st

TLS
#ssl_session_tickets on;
#ssl_session_timeout 1h;
#ssl_session_ticket_key /run/nginx-ephemeral/nginx_session_ticket_curr;
#ssl_session_ticket_key /run/nginx-ephemeral/nginx_session_ticket_prev;
#ssl_session_ticket_key /run/nginx-ephemeral/nginx_session_ticket_next;
http://fangpeishi.com/optimizing-tls-record-size.html
http://fangpeishi.com/optimizing-tls-record-size.html


.https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/

ssl_ciphers '[ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305|ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]:ECDHE+AES128:RSA+AES128:ECDHE+AES256:RSA+AES256:ECDHE+3DES:RSA+3DES';

ssl_prefer_server_ciphers on;

AIO
aio threads;
aio_write on;
http://www.infoq.com/cn/articles/thread-pools-boost-performance-9x


.https://blogs.dropbox.com/tech/2017/09/optimizing-web-servers-for-high-throughput-and-low-latency/

Open file cache
open_file_cache max=10000;
open_file_cache_min_uses 2;
open_file_cache_errors on;
http://blog.justwd.net/snippets/nginx/nginx-open-file-cache/




.auto nginx mod CENTMIN MOD
https://centminmod.com/



======clern cache=======
https://leokongwq.github.io/2016/11/25/nginx-cache.html

Port Forwarding Gateway via iptables on Linux

1、
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html#NATSG

1.1、Create instance form ami :ami-vpc-nat-hvm    choese best new
***NAT AMI***

1.2、

Check.IPv4 forwarding is enabled and ICMP redirects are disabled in /etc/sysctl.d/10-nat-settings.conf

IPv4 forwarding =1


Run.A script located at /usr/sbin/configure-pat.sh runs at startup and configures iptables IP masquerading.
Here have problem, so must delete  POSTROUTING

sudo iptables -t nat -D POSTROUTING 1


2、
https://holtstrom.com/michael/blog/post/400/Port-Forwarding-Gateway-via-iptables-on-Linux.html

eth0 10.0.0.219  52.78.165.129

eth1 10.0.1.149

web server 10.0.1.249

iptables -vxnL --line-numbers
iptables -t nat -vxnL --line-numbers

watch -n 1 sudo iptables -vxnL --line-numbers
watch -n 1 sudo iptables -t nat -vxnL --line-numbers

===Start===
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

iptables -t nat -A PREROUTING -i eth0 -p tcp -d 10.0.0.219 --dport 888 \
     -j DNAT --to-destination 10.0.1.249:80

☆ iptables -t nat -A POSTROUTING -j MASQUERADE     //key point, can't use out eth0



===抓封包===
tcpdump -i eth0 -p tcp and port 888 -n -v

===刪除===
iptables -D INPUT 2
iptables -t nat -D PREROUTING 2
iptables -t nat -D POSTROUTING 2




===無用===
iptables -A FORWARD -p tcp -m conntrack --ctstate RELATED,ESTABLISHED -d 10.0.1.249 -j ACCEPT

iptables -A FORWARD -d 10.0.1.249 -p tcp --dport 80 -j ACCEPT


iptables -t nat -A POSTROUTING -j SNAT --to-source 10.0.0.219
===無用===


===無用  這行解決 telnet localhost 888===
iptables -t nat -A OUTPUT -p tcp -o lo --dport 888 -j DNAT --to 10.0.1.249:80




html5 rtmp stream

https://blog.gmem.cc/research-on-html5-video-surveillance

JSMpeg – MPEG1 Video & MP2 Audio Decoder in JavaScript for ios stream

First try this demo can play on ios

http://jsmpeg.com/

Second

https://github.com/phoboslab/jsmpeg#encoding-videoaudio-for-jsmpeg


view-stream.html    (nodejs localhost:8080 maybe can see)

websocket-relay.js  this is use node.js then get ws server



Import !!

ffmpeg -re -i rtmp://xxx.xxx.xxx.xxx/live/ooo -f mpegts -codec:v mpeg1video -bf 0 -codec:a mp2 -s 640x360 -r 30  -q 4 -muxdelay 0.001 http://localhost:8081/password  


-re 參數表示以視頻實際播放速率解碼,不加這個參數一般會導致直播速率變得飛快
-re一定要加,代表按照帧率发送,否则ffmpeg会一股脑地按最高的效率发送数据。

-muxdelay 0.001   reduce lag   (maybe no use)

-q  4   Need test
You're setting -q 1, which is the best possible quality. Try setting it to 4 or 8 instead.

compression_level (-q)
Set algorithm quality. Valid arguments are integers in the 0-9 range, with 0 meaning highest quality but slowest, and 9 meaning fastest while producing the worst quality. Can put more than 9.

mpegts this is see error, then find some guy say use mpegts. 
Don't use mpeg1video
https://github.com/phoboslab/jsmpeg/issues/149

localhost:8081/password   this is "node websocket-relay.js"  screen have notify, just try

Example:  node websocket-relay.js password 8081 8080






https://github.com/phoboslab/jsmpeg#example-setup-for-streaming-raspberry-pi-live-webcam

mariadb galera cluster ubuntu 16 diy

https://www.howtoforge.com/tutorial/how-to-install-and-configure-galera-cluster-on-ubuntu-1604/

nginx proxy pass

see  http://sueboy.blogspot.tw/2017/11/nginx-proxy-pass-best-practices.html
http://sueboy.blogspot.tw/2017/11/nginx-proxy-pass-best-practices-2-for.html


server {
  listen 80;
  server_name aaaa.bbbbb.com;
  location /
    {
        proxy_http_version 1.1;
        #proxy_set_header Upgrade $http_upgrade;
        #proxy_set_header Connection "upgrade";
        proxy_pass http://xxx.xxx.xxx.xxx:80;
    }
}
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;

proxy_set_header X-Original-Host $http_host;
proxy_set_header X-Original-Scheme $scheme;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;

client_max_body_size 10m;
client_body_buffer_size 128k;

# client_body_temp_path /var/nginx/client_body_temp;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
#proxy_send_lowat 12000;

proxy_buffer_size 32k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

# proxy_temp_path /var/nginx/proxy_temp;

proxy_ignore_client_abort on;

proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;

proxy_max_temp_file_size 128m;