현재 SSL 크기 중에 안전하면서도 가벼운 (속도 빠른) 크기는 다음과 같다.
- ECC : 256 bit
- RSA : 2048 bit
이 크기보다 더 큰 경우에는 속도가 느리다는 단점이 있다. 물론 PC에서는 체감하기 힘들겠지만, 서버에도 부담 될 뿐더러 모바일 사용자에게는 좋은 경험이 되지 못 한다.
This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here
Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
Math.random()
. There are extremely few cases where Math.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.uuid
, specifically the uuid.v4()
method. Avoid node-uuid
- it's not the same package, and doesn't produce reliably secure random values.random-number-csprng
.You should seriously consider reading the entire article, though - it's
Find the Discord channel in which you would like to send commits and other updates
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel
using System; | |
using System.Runtime.InteropServices; | |
public class FxHook:IDisposable { | |
const int nBytes = 5; | |
IntPtr addr; | |
Protection old; | |
byte[] src = new byte[5]; |
// Filename: HttpServer.cs | |
// Author: Benjamin N. Summerton <define-private-public> | |
// License: Unlicense (http://unlicense.org/) | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
using System.Threading.Tasks; |
<?php | |
// 비대칭 알고리듬인 RSA를 사용하여 문자열을 암호화하는 법. | |
// 개인키 비밀번호는 암호화할 때는 필요없고 복호화할 때만 입력하면 되므로 | |
// 서버에 저장할 필요 없이 그때그때 관리자가 입력하도록 해도 된다. | |
// PHP 5.2 이상, openssl 모듈이 필요하다. | |
// RSA 개인키, 공개키 조합을 생성한다. | |
// 키 생성에는 시간이 많이 걸리므로, 한 번만 생성하여 저장해 두고 사용하면 된다. | |
// 단, 비밀번호는 개인키를 사용할 때마다 필요하다. |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.