Skip to content
Snippets Groups Projects
Commit eae45569 authored by nahyun's avatar nahyun
Browse files

Merge branch 'feat/forwarding' into 'dev'

Feat/forwarding 포트포워딩 CRUD

See merge request !7
parents 02fbd7f6 e6f1aafb
No related branches found
No related tags found
2 merge requests!15Feat/certificate,!7Feat/forwarding 포트포워딩 CRUD
package com.aolda.itda.template;
import org.springframework.stereotype.Component;
@Component
public class ForwardingTemplate {
public String getPortForwardingWithTCP(String serverPort, String instanceIp, String instancePort, String name) {
return "# " + name + "\n" +
"server { \n" +
" listen " + serverPort + "; \n" +
" listen [::]:" + serverPort + "; \n" +
" proxy_pass " + instanceIp + ":" + instancePort + ";\n" +
"} \n";
}
}
package com.aolda.itda.template;
import org.springframework.stereotype.Component;
@Component
public class OptionTemplate {
public String getSSL(Long certificateId) {
return "\nconf.d/include/letsencrypt-acme-challenge.conf;\n" +
"include conf.d/include/ssl-ciphers.conf;\n" +
"ssl_certificate /etc/letsencrypt/live/npm-" + certificateId + "/fullchain.pem;\n" +
"ssl_certificate_key /etc/letsencrypt/live/npm-" + certificateId + "/privkey.pem;\n";
}
public String getAssetCaching() {
return "include conf.d/include/assets.conf;\n";
}
public String getBlockExploits() {
return "include conf.d/include/block-exploits.conf;\n";
}
public String getForceSSL() {
return "include conf.d/include/force-ssl.conf;\n";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment