chromium socks5 proxy settings desktop

cat /usr/share/applications/chromium.desktop | grep Exec
Exec=/usr/bin/chromium %U --proxy-server="socks5://192.168.0.0:8083"
2024/06/05 · Zvezdo4kin · 0 комментариев (-я)

curl response http status code

curl -s -o /dev/null -w "%{http_code}" http://www.example.org/
       -w, --write-out <format>
              Make curl display information on stdout after a completed trans-
              fer.  The  format  is a string that may contain plain text mixed
              with any number of variables. The format can be specified  as  a
              literal  "string",  or  you can have curl read the format from a
              file with "@filename" and to tell curl to read the  format  from
              stdin you write "@-".

              The  variables  present in the output format will be substituted
              by the value or text that curl thinks fit, as  described  below.
              All  variables are specified as %{variable_name} and to output a
              normal % you just write them as %%. You can output a newline  by
              using \n, a carriage return with \r and a tab space with \t.

              The  output  will be written to standard output, but this can be
              switched to standard error by using %{stderr}.

              NOTE: The %-symbol is a special symbol in the win32-environment,
              where  all  occurrences of % must be doubled when using this op-
              tion.

              The variables available are:

              content_type   The Content-Type of the  requested  document,  if
                             there was any.

              filename_effective
                             The  ultimate  filename  that curl writes out to.
                             This is only meaningful if curl is told to  write
                             to  a  file  with  the  -O,  --remote-name or -o,
                             --output option. It's most useful in  combination
                             with  the -J, --remote-header-name option. (Added
                             in 7.26.0)

              ftp_entry_path The initial path curl ended up in when logging on
                             to the remote FTP server. (Added in 7.15.4)

              http_code      The numerical response code that was found in the
                             last retrieved HTTP(S)  or  FTP(s)  transfer.  In
                             7.18.2  the alias response_code was added to show
                             the same info.

              http_connect   The numerical code that was found in the last re-
                             sponse  (from a proxy) to a curl CONNECT request.
                             (Added in 7.12.4)

              http_version   The  http  version  that  was  effectively  used.
                             (Added in 7.50.0)

              json           A JSON object with all available keys.

              local_ip       The  IP  address of the local end of the most re-
                             cently done connection - can be  either  IPv4  or
                             IPv6 (Added in 7.29.0)

              local_port     The  local  port number of the most recently done
                             connection (Added in 7.29.0)

              method         The http method used in the most recent HTTP  re-
                             quest (Added in 7.72.0)

              num_connects   Number  of new connects made in the recent trans-
                             fer. (Added in 7.12.3)

              num_headers    The number of response headers in the most recent
                             request (restarted at each
                              redirect).  Note  that  the status line IS NOT a
                             header. (Added in 7.73.0)

              num_redirects  Number of redirects that were followed in the re-
                             quest. (Added in 7.12.3)

              proxy_ssl_verify_result
                             The result of the HTTPS proxy's SSL peer certifi-
                             cate verification that was requested. 0 means the
                             verification was successful. (Added in 7.52.0)

              redirect_url   When an HTTP request was made without -L, --loca-
                             tion to follow redirects (or when --max-redir  is
                             met),  this  variable  will show the actual URL a
                             redirect would have gone to. (Added in 7.18.2)

              remote_ip      The remote IP address of the most  recently  done
                             connection - can be either IPv4 or IPv6 (Added in
                             7.29.0)

              remote_port    The remote port number of the most recently  done
                             connection (Added in 7.29.0)

              response_code  The numerical response code that was found in the
                             last transfer (formerly  known  as  "http_code").
                             (Added in 7.18.2)

              scheme         The  URL  scheme (sometimes called protocol) that
                             was effectively used (Added in 7.52.0)

              size_download  The total amount of bytes that were downloaded.

              size_header    The total amount of bytes of the downloaded head-
                             ers.

              size_request   The  total  amount of bytes that were sent in the
                             HTTP request.

              size_upload    The total amount of bytes that were uploaded.

              speed_download The average download speed that curl measured for
                             the complete download. Bytes per second.

              speed_upload   The  average  upload speed that curl measured for
                             the complete upload. Bytes per second.

              ssl_verify_result
                             The result of the SSL peer certificate  verifica-
                             tion that was requested. 0 means the verification
                             was successful. (Added in 7.19.0)

              stderr         From this point on, the  -w,  --write-out  output
                             will  be  written  to  standard  error. (Added in
                             7.63.0)

              stdout         From this point on, the  -w,  --write-out  output
                             will  be written to standard output.  This is the
                             default, but can be used  to  switch  back  after
                             switching to stderr.  (Added in 7.63.0)

              time_appconnect
                             The  time, in seconds, it took from the start un-
                             til the SSL/SSH/etc connect/handshake to the  re-
                             mote host was completed. (Added in 7.19.0)

              time_connect   The  time, in seconds, it took from the start un-
                             til the TCP connect to the remote host (or proxy)
                             was completed.

              time_namelookup
                             The  time, in seconds, it took from the start un-
                             til the name resolving was completed.

              time_pretransfer
                             The time, in seconds, it took from the start  un-
                             til  the  file  transfer was just about to begin.
                             This includes all pre-transfer commands and nego-
                             tiations that are specific to the particular pro-
                             tocol(s) involved.

              time_redirect  The time, in seconds, it took for all redirection
                             steps including name lookup, connect, pretransfer
                             and transfer before  the  final  transaction  was
                             started.  time_redirect shows the complete execu-
                             tion time for multiple  redirections.  (Added  in
                             7.12.3)

              time_starttransfer
                             The  time, in seconds, it took from the start un-
                             til the first byte was just about  to  be  trans-
                             ferred.  This  includes time_pretransfer and also
                             the time the server needed to calculate  the  re-
                             sult.

              time_total     The  total time, in seconds, that the full opera-
                             tion lasted.

              url_effective  The URL that was fetched last. This is most mean-
                             ingful  if  you've  told curl to follow location:
                             headers.

              If this option is used several times, the last one will be used.
2024/05/14 · Zvezdo4kin · 0 комментариев (-я)

recursively-chmod-all-directories-except-files

To recursively give directories read&execute privileges:

find /path/to/base/dir -type d -exec chmod 755 {} +

To recursively give files read privileges:

find /path/to/base/dir -type f -exec chmod 644 {} +

Or, if there are many objects to process:

chmod 755 $(find /path/to/base/dir -type d)
chmod 644 $(find /path/to/base/dir -type f)

Or, to reduce chmod spawning:

find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
2023/08/28

TDLib send message by phone number

How to send message in Telegram API by phone number.

TDLib calls:

  • importContacts
  • createPrivateChat
  • sendMerssage

Make a request like this:

{
  "api_key": "YOUR_API_KEY",
  "@type": "importContacts",
  "contacts": [{
      "first_name": "Jane",
      "last_name": "Doe",
      "phone_number": "+1555012345",
      "user_id": 0
  }]
}

You will receive response similar to this:

{
  "@type": "importedContacts",
  "user_ids": [
    1234567
  ],
  "importer_count": [
    8
  ],
  "@extra": "f402e93d-0cc3-4765-ad54-2f5f5c593a9b"
}
Take the user_id from previous response and use it in next request:

{
    "api_key": "YOUR_API_KEY",
    "@type": "createPrivateChat",
    "user_id": 1234567
  }

Send message using user_id as chat_id like this:

{
    "api_key": "YOUR_API_KEY",
    "@type": "sendMessage",
    "chat_id": "1234567",
    "disable_notification": true,
    "input_message_content": {
      "@type": "inputMessageText",
      "disable_web_page_preview": false,
      "text": {
        "@type": "formattedText",
        "text": "Hello world"
      }
    }
  }
  

Baresip

Baresip - портативный и модульный SIP агент с поддержкой аудио и видео.

в Arch

pacman -S baresip

Конфигурационные файлы расположены в ~/.baresip

Путь к ним можно изменить аргументом -f

baresip -f path_to_your_config

Для начала использования достаточно добавить пользователя в ~/.baresip/accounts

Может быть добавлено несколько пользователей, 1 строчка - 1 пользователь.

<sip:user1@192.0.2.4;transport=udp>;auth_pass=secret
<sip:user2@192.0.2.4;transport=udp>;auth_pass=secret

Запуск в консоли:

baresip

Основные команды в консоли baresip:

Переключение между пользователями /uafind

/uafind sip:user1@192.0.2.4

Совершить вызов /dial или d

/dial 123456789

Принять входящий вызов /accept или a

/accept

Завершить вызов - ESC

Выбор пользователя и звонок напрямую из CLI

baresip -e '/uafind sip:user2@192.0.2.4' -e '/dial user1@192.0.2.4'
2023/08/04 · Смирнов Егор

Предыдущие записи >>

page
start
Asterisk Call Center Stats Compare Answered Unanswered Calls Example
AJAX PHP MySQL CSV
apache_httpd_reverse_proxy
Asterisk AMI AJAM Parser php
Asterisk round-robin memory trunk group
asterisk mp3 convert to wav 16b 8000hz
autovacuum
Baresip
Ротация bash_history
bash manipulating string
blind
Checking the speed of writing to a disc
chromium socks5 proxy settings desktop
Create boot usb stick
CURL GOIP SMS
curl response http status code
Debian 9 officially FS
Debian 9 php5.6 Install
debian 9 VPN pptp
Debian9 Stretch Configure Locale en_US.UTF-8
Asterisk Advanced Message Queue Protocol
Динамические массивы в C
Dynamic Memory Allocation in C using malloc(), calloc(), free() and realloc()
freeswitch a1-hash and password generating
FreeSwitch Directory MySql storage with Lua Dbh
Debian 9 Stretch Install Goip Sms Server
Handlebars Helper LastCall Queue Agent
Pandoc: html_to_dokuwiki
Intraservice API + Asterisk + cURL
Lua as a Configuration And Data Exchange Language For "C"
How non-root users manage systemd
openresty
postgres alter sequence
postgresql pg_dump
Reboot IP LDK over telnet from bash script
recursively-chmod-all-directories-except-files
Redis+Lua - routing calls by mobile operator DEF code
Bash: Поиск и операции с файлами по выборке имен из БД
Minimum configuration requirements for using stun server (Coturn)
Slack Incoming Webhook with Php Curl
sngrep
switch_core_db.c:92 SQLite is BUSY
StrongSwan install from source
Sublime Regex
TCPdump: программа для перехвата и анализа SIP-сообщений.
TDLib send message by phone number
ubuntu_remap_super_key
  • blog.txt
  • Последние изменения: 2019/03/27