[go: up one dir, main page]

Just Sharing Knowledge on Robotics, Electronics and Programming

Saturday, October 24, 2020

Jitsi Command Library


 1. Running Jicofo

systemctl restart jicofo


2. bind-http jitsi

Check : curl http://localhost:5280/http-bind


3. Prosody 

Restart: /etc/init.d/prosody start

status  sudo prosodyctl status

stop prosodyctl stop

 

4. Uninstall Jitsi

sudo apt purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge2 

 

5. Jitsi Nginx

server {
   listen 443;
    server_name vcon.
hano.xyz;
    # set the root
    root /usr/share/jitsi-meet;
    index index.html;
    location ~ ^/([a-zA-Z0-9=\?]+)$ {
        rewrite ^/(.*)$ / break;
    }
    location / {
        ssi on;
    }
    
    location /http-bind {
        proxy_pass      http://localhost:5280/http-bind;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;
    }
    
    location /external_api.js {
        alias /usr/share/jitsi-meet/libs/external_api.min.js;
    }
    
    location = /config.js {
    alias /etc/jitsi/meet/vcon.hano.xyz-config.js;
}
  ssl on;
 
  ssl_certificate /etc/letsencrypt/live/vcon.
hano.xyz/cert.pem;
  ssl_certificate_key /etc/letsencrypt/live/vcon.
hano.xyz/privkey.pem;
}

Saturday, June 27, 2020

Java Keystore Problem: Trustore with Subject CN is Not Ca Certificate


Detailed Step by Step instructions I followed to achieve this

 SSource : StackOverflow =>
Vipul
  • Download bouncycastle JAR from http://repo2.maven.org/maven2/org/bouncycastle/bcprov-ext-jdk15on/1.46/bcprov-ext-jdk15on-1.46.jar or take it from the "doc" folder.
  • Configure BouncyCastle for PC using one of the below methods.
    • Adding the BC Provider Statically (Recommended)
      • Copy the bcprov-ext-jdk15on-1.46.jar to each
        • D:\tools\jdk1.5.0_09\jre\lib\ext (JDK (bundled JRE)
        • D:\tools\jre1.5.0_09\lib\ext (JRE)
        • C:\ (location to be used in env variable)
      • Modify the java.security file under
        • D:\tools\jdk1.5.0_09\jre\lib\security
        • D:\tools\jre1.5.0_09\lib\security
        • and add the following entry
          • security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider
      • Add the following environment variable in "User Variables" section
        • CLASSPATH=%CLASSPATH%;c:\bcprov-ext-jdk15on-1.46.jar
    • Add bcprov-ext-jdk15on-1.46.jar to CLASSPATH of your project and Add the following line in your code
      • Security.addProvider(new BouncyCastleProvider());
  • Generate the Keystore using Bouncy Castle
    • Run the following command
      • keytool -genkey -alias myproject -keystore C:/myproject.keystore -storepass myproject -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider
    • This generates the file C:\myproject.keystore
    • Run the following command to check if it is properly generated or not
      • keytool -list -keystore C:\myproject.keystore -storetype BKS
  • Configure BouncyCastle for TOMCAT
    • Open D:\tools\apache-tomcat-6.0.35\conf\server.xml and add the following entry
      • <Connector port="8443" keystorePass="myproject" alias="myproject" keystore="c:/myproject.keystore" keystoreType="BKS" SSLEnabled="true" clientAuth="false" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS" sslImplementationName="org.bouncycastle.jce.provider.BouncyCastleProvider"/>
    • Restart the server after these changes.
  • Configure BouncyCastle for Android Client
    • No need to configure since Android supports Bouncy Castle Version 1.46 internally in the provided "android.jar".
    • Just implement your version of HTTP Client (MyHttpClient.java can be found below) and set the following in code
      • SSLSocketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
    • If you don't do this, it gives an exception as below
      • javax.net.ssl.SSLException: hostname in certificate didn't match: <192.168.104.66> !=
    • In production mode, change the above code to
      • SSLSocketFactory.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);

Saturday, March 7, 2020

Instalation and Configuration Minio Storage Server in Linux Ubuntu 18.04




1. Download minio
wget https://dl.min.io/server/minio/release/linux-amd64/minio
2. Install Minio
 chmod +x minio
./minio server /data
3. Change Credential
export MINIO_ACCESS_KEY=YQWERTYU12RHJW2YJASD
export MINIO_SECRET_KEY= xH+Qwerty+ASDF+HDd7DRNOFvl7sL8ASDFjwZXCg
4. Run server
./minio server /data
5. Monit Configuration

  check process minio
        matching minio
        start program = "/bin/bash -c '/root/minio.py start'"
        stop program = "/bin/bash -c '/root/minio.py stop'"
        if cpu usage > 95% for 10 cycles then restart 
6.  Python minio.py
#!/usr/bin/python2
import sys
import os
action = sys.argv[1]
if action == 'start':
    os.system("export MINIO_ACCESS_KEY=YQWERTYU12RHJW2YJASD \n export MINIO_SECRET_KEY=xH+Qwerty+ASDF+HDd7DRNOFvl7sL8ASDFjwZXCg \n /root/minio server /data")
if action == 'stop':
    os.system("kill -9 $(pgrep minio)")


7. Change permision of minio.py file
chmod +x minio.py

8. Restart Monit
 systemctl restart monit

9. Status Monit Check
 systemctl status monit

Wednesday, September 11, 2019

How to using ARM Bluepill STM32F103C8 on Arduino Ide



1. Download STM32 Driver from this site https://github.com/rogerclarkmelbourne/Arduino_STM32
2. Extract and Install Arduino_STM32-master\drivers\win\install_drivers.bat or install_STM_COM_drivers.bat
3. This driver is must be installed correctly. if you are still found your driver as Usb serial device, it will show the errror " Couldn't find the DFU device: [1EAF:0003] "
4. the following Configurations is needed.

Thursday, August 22, 2019

How to Copy Colored Script Code in Arduino IDE to Word or other formated text


if you want to write arduino tutorial on a book, and you want to coloring your script like arduino script. there are two ways to do this

1. using snipping tools to screenshot your code
2. using the following ways
  •  Visit  https://codebeautify.org/htmlviewer/
  •  on arduino ide, ctrl+a (select all) your script and Right Click, Copy as html
  •  Paste on HTML input
  • and copy your script on Result : HTML Output to your microsoft word

  

Saturday, May 11, 2019

Multiple SSL sub Domain LetsEncrypt


If you want to install ssl on all subdomain you can use the following

sudo certbot-auto certonly  -d *.example.com --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns  --manual