This commit is contained in:
karl.hudgell 2021-03-12 13:56:26 +00:00
parent c8e3fb4f6f
commit d05d37e4f9
13 changed files with 85 additions and 57 deletions

View File

@ -2,7 +2,6 @@ FROM node:12-alpine
LABEL version="1.0" LABEL version="1.0"
LABEL description="DNS BACKEND" LABEL description="DNS BACKEND"
# LABEL maintainer = ["danielmurph8@gmail.com", "dylanedwards290@gmail.com"]
WORKDIR /app WORKDIR /app
@ -10,7 +9,7 @@ COPY ["package.json", "package-lock.json", "./"]
RUN ls RUN ls
RUN npm i RUN npm i
RUN apk --no-cache add curl # RUN apk --no-cache add curl
COPY . . COPY . .

View File

@ -1,2 +1,4 @@
node_modules node_modules
npm-debug.log npm-debug.log
client
SQL

View File

@ -42,7 +42,7 @@ streamName
('Gambler', 'http://37723998.to:2052'), ('Gambler', 'http://37723998.to:2052'),
('Liveclub', 'http://apkdns.store:8080'), ('Liveclub', 'http://apkdns.store:8080'),
('Opplex', 'http://opplex.tv:8080'), ('Opplex', 'http://opplex.tv:8080'),
('DIAZ', 'http://ruby.dnsfor.me:8880'), ('DIAZ', 'http://gold.mypsx.net:8880'),
('USA', 'http://pimptv.dnsabr.com:8080'), ('USA', 'http://pimptv.dnsabr.com:8080'),
('VIPER', 'http://tavaratv.xyz:2095'), ('VIPER', 'http://tavaratv.xyz:2095'),
('SUNBED', 'http://cms-tan.media:8880'), ('SUNBED', 'http://cms-tan.media:8880'),
@ -88,13 +88,13 @@ username
('Dazg3012', '476dd5316a78251fe26cea0a2d2786e8ddaeb8da99f99bfff9e1e34267eb3d0e79f0549cb102edcacd9a1685ee940347f43343c0314fca3816f81d9ec7b9370670e4ec7dddd695795752ad188c56207eb1ef6464d0e8690d4a44084a0918ec12ba6ca01c0d613463886f', 'Old Premium', 2, 1640885178), ('Dazg3012', '476dd5316a78251fe26cea0a2d2786e8ddaeb8da99f99bfff9e1e34267eb3d0e79f0549cb102edcacd9a1685ee940347f43343c0314fca3816f81d9ec7b9370670e4ec7dddd695795752ad188c56207eb1ef6464d0e8690d4a44084a0918ec12ba6ca01c0d613463886f', 'Old Premium', 2, 1640885178),
('Martin1607', '33db85e33346ac83bc72c2feac294873edab0ec43bba6da5830275af7dbca539a445d3667874ba3cb64b9861a52f9aaa452140d92a3df0e6f87cb8d2eb6eceb9d0c0faaf284164beacb0bca8f3870794c2acd1f29ef310c150b4b1ff2b6e007b249b33c9144688eac57f', 'GunSlinger', 3, 2147483647), ('Martin1607', '33db85e33346ac83bc72c2feac294873edab0ec43bba6da5830275af7dbca539a445d3667874ba3cb64b9861a52f9aaa452140d92a3df0e6f87cb8d2eb6eceb9d0c0faaf284164beacb0bca8f3870794c2acd1f29ef310c150b4b1ff2b6e007b249b33c9144688eac57f', 'GunSlinger', 3, 2147483647),
('Martin2204', '8c7e61d5131661fbb246ad7dad0eb05e481235fa5574707b287619331c77da16643ca1c94fb82fd4290a4bc79c7773428a56673e5c3b20c5d13753d66693da69326c3a5be854fefe8b9829e8e6f4e8775e949959cd4caa8d0d063870a8d0da35167566cb575d459a7594', 'Gold', 3, 1619089223), ('Martin2204', '8c7e61d5131661fbb246ad7dad0eb05e481235fa5574707b287619331c77da16643ca1c94fb82fd4290a4bc79c7773428a56673e5c3b20c5d13753d66693da69326c3a5be854fefe8b9829e8e6f4e8775e949959cd4caa8d0d063870a8d0da35167566cb575d459a7594', 'Gold', 3, 1619089223),
('Karl2404', 'c5ee1fa1168da4abdf5cd12697258141f0c68d50269d8f229c422e9af2f79662daabca432d9a1de40ef907cfdbcb42d8e3b98620a221a17020abb0c0552f50859d10baef6f06482d6fcba91d975034bb99c3428e78921f5c155467090a587a5d6cd0783b9051a06283cb', 'Gold', 1, NULL), ('Karl2404', 'c5ee1fa1168da4abdf5cd12697258141f0c68d50269d8f229c422e9af2f79662daabca432d9a1de40ef907cfdbcb42d8e3b98620a221a17020abb0c0552f50859d10baef6f06482d6fcba91d975034bb99c3428e78921f5c155467090a587a5d6cd0783b9051a06283cb', 'Gold', 1, 1619272032),
('Karl2804', 'a2d35b98846ade449e1fb07f65627b9a219f5c755418cd3da5c51f6467f99e70e4a0f444899b355df7724c972ec88624298e8efb777005590d4053749d596c09abe96c1fc4ff38237e0d7583edc0aca8516dd54ac09d81bab7d0b55fcae5095db9385e6e8530bd9ef4b1', 'Gold', 1, NULL), ('Karl2804', 'a2d35b98846ade449e1fb07f65627b9a219f5c755418cd3da5c51f6467f99e70e4a0f444899b355df7724c972ec88624298e8efb777005590d4053749d596c09abe96c1fc4ff38237e0d7583edc0aca8516dd54ac09d81bab7d0b55fcae5095db9385e6e8530bd9ef4b1', 'Gold', 1, 1619627584),
('Karl2904', '55dfce0674e85eeef328c1ea86a9f4d1c661468c18cc1d4d60457e5bec45e19621d7e8a57367ba8d31a7461712bef8e5c05518b72194ffde95a5deed34a3bc3f68f48c1546a79a7a19dc260030c9b4cc5f4fef9544665846e50f5212a921a5053a5ee237895718db9e67', 'Gold', 1, NULL), ('Karl2904', '55dfce0674e85eeef328c1ea86a9f4d1c661468c18cc1d4d60457e5bec45e19621d7e8a57367ba8d31a7461712bef8e5c05518b72194ffde95a5deed34a3bc3f68f48c1546a79a7a19dc260030c9b4cc5f4fef9544665846e50f5212a921a5053a5ee237895718db9e67', 'Gold', 1, 1619717072),
('Karl150520', 'dc4c407fda600e361db82323cef5fc51c9c9cf67fbd67711b38a49f4c5b10b3dbf62d8b7a531252b35222b0186c876fbdfea39414484916765aabab08bbd828d67b6e668f89927f95a3e08f3b45206658ea516711a65c5c4e28d98b9236e5fd8a1317b78626e49572f83', 'Gold', 1, NULL), ('Karl150520', 'dc4c407fda600e361db82323cef5fc51c9c9cf67fbd67711b38a49f4c5b10b3dbf62d8b7a531252b35222b0186c876fbdfea39414484916765aabab08bbd828d67b6e668f89927f95a3e08f3b45206658ea516711a65c5c4e28d98b9236e5fd8a1317b78626e49572f83', 'Gold', 1, 1621103874),
('Karl1505', '7bfdf1ab7d86e07a3eb6c5614578c41c571ae6f3faaf836233a9b6f33538c6ea1125dab202d99325a92cd35856191fc495b7e5ec6cb2765d5bafa2af18f43c94f3392425a65a14e0e712d1c5de04f662fb84dc14b37151796db7f0eaec8b34351adfd2a93961125b04d9', 'Gold', 1, NULL), ('Karl1505', '7bfdf1ab7d86e07a3eb6c5614578c41c571ae6f3faaf836233a9b6f33538c6ea1125dab202d99325a92cd35856191fc495b7e5ec6cb2765d5bafa2af18f43c94f3392425a65a14e0e712d1c5de04f662fb84dc14b37151796db7f0eaec8b34351adfd2a93961125b04d9', 'Gold', 1, 1621103852),
('Karloss0403', '71f8993c61b41ece3e3a7e8b50ec956670998b9930e667e9f2881ce508effc5b98bac9ddc3579f0455111203e092713bc7375ddd552f0cd7a33c698c147a6d9eea623099c3f993ff8634ef42975c6f8f0e28fb5f81ab1fa3e17a9729388c4b9779e3e9e16204fa570bcb', 'KDB', 1, NULL), ('Karloss0403', '71f8993c61b41ece3e3a7e8b50ec956670998b9930e667e9f2881ce508effc5b98bac9ddc3579f0455111203e092713bc7375ddd552f0cd7a33c698c147a6d9eea623099c3f993ff8634ef42975c6f8f0e28fb5f81ab1fa3e17a9729388c4b9779e3e9e16204fa570bcb', 'KDB', 1, 1646394742),
('Karloss0403', '364cafa40eb896ffc220975d3b52431723a6d715a17c13f12296d62fa1e5f31f71ba2809e3fb9120231de8c388a736eec9064494a187fa7cf10357425d5b8c9d545487e5fed49407afad377f0225d935ea08e867dd803f5c12472a3e70cca7bd233a314a8c747e8ec751', 'DIAZ', 1, NULL); ('Karloss0403', '364cafa40eb896ffc220975d3b52431723a6d715a17c13f12296d62fa1e5f31f71ba2809e3fb9120231de8c388a736eec9064494a187fa7cf10357425d5b8c9d545487e5fed49407afad377f0225d935ea08e867dd803f5c12472a3e70cca7bd233a314a8c747e8ec751', 'DIAZ', 1, 1646394794);
DROP TABLE IF EXISTS `users`; DROP TABLE IF EXISTS `users`;

View File

@ -9,7 +9,7 @@ COPY ["package.json", "package-lock.json", "./"]
ENV PORT=6969 ENV PORT=6969
RUN apk --no-cache add curl # RUN apk --no-cache add curl
RUN npm install --production RUN npm install --production
COPY . . COPY . .

18
client/Dockerfile.prod Normal file
View File

@ -0,0 +1,18 @@
# stage1 - build react app first
FROM node:12-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY ./package.json /app/
COPY ./yarn.lock /app/
RUN yarn
COPY . /app
RUN yarn build
# stage 2 - build the final image and copy the react build files
FROM nginx:1.17.8-alpine
COPY --from=build /app/build /usr/share/nginx/html
RUN apk --no-cache add curl
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 6969
CMD ["nginx", "-g", "daemon off;"]

21
client/nginx/nginx.conf Normal file
View File

@ -0,0 +1,21 @@
server {
listen 6969;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# to redirect all the requests to index.html,
# useful when you are using react-router
try_files $uri /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -1,8 +0,0 @@
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -4,7 +4,9 @@ async function readCookie() {
try { try {
const res = await axios.get("/readCookie"); const res = await axios.get("/readCookie");
console.log('IM CHECKING AUTH')
if (res.data === "No Cookie Set") { if (res.data === "No Cookie Set") {
console.log('I CHECKED AUTH')
document.location = "/"; document.location = "/";
} }
} catch (e) { } catch (e) {

View File

@ -109,8 +109,9 @@ class AddAccount extends Component {
<Dropdown <Dropdown
options={arr} options={arr}
onChange={this._onSelect} onChange={this._onSelect}
value={arr[0]} // defaultValue={arr[3]}
placeholder="Select an option" // value={arr[0]}
placeholder="Select an account"
/> />
</p> </p>
<br /> <br />

View File

@ -4,48 +4,39 @@ import { Link, withRouter } from "react-router-dom";
function Navigation(props) { function Navigation(props) {
return ( return (
<div className="navigation"> <div className="navigation">
<nav class="navbar navbar-expand navbar-dark bg-dark"> <nav className="navbar navbar-expand navbar-dark bg-dark">
<div class="container"> <div className="container">
<Link class="navbar-brand" to="/"> <Link className="navbar-brand" to="/">
BBLB_DNS BBLB_DNS
</Link> </Link>
<div> <div>
<ul class="navbar-nav ml-auto"> <ul className="navbar-nav ml-auto">
<li <li
class={`nav-item ${ className={`nav-item ${
props.location.pathname === "/" ? "active" : "" props.location.pathname === "/" ? "active" : ""
}`} }`}
> >
<Link class="nav-link" to="/"> <Link className="nav-link" to="/">
Home Home
<span class="sr-only">(current)</span> <span className="sr-only">(current)</span>
</Link> </Link>
</li> </li>
<li <li
class={`nav-item ${ className={`nav-item ${
props.location.pathname === "/accounts" ? "active" : "" props.location.pathname === "/accounts" ? "active" : ""
}`} }`}
> >
<Link class="nav-link" to="/accounts"> <Link className="nav-link" to="/accounts">
Accounts Accounts
</Link> </Link>
</li> </li>
{/* <li
class={`nav-item ${
props.location.pathname === "/ServerList" ? "active" : ""
}`}
>
<Link class="nav-link" to="/ServerList">
Server List
</Link>
</li> */}
<li <li
class={`nav-item ${ className={`nav-item ${
props.location.pathname === "/AddAccount" ? "active" : "" props.location.pathname === "/AddAccount" ? "active" : ""
}`} }`}
> >
<Link class="nav-link" to="/AddAccount"> <Link className="nav-link" to="/AddAccount">
Add Account Add Account
</Link> </Link>
</li> </li>

View File

@ -6,6 +6,8 @@ services:
context: . context: .
dockerfile: .dockerfile dockerfile: .dockerfile
image: "karl0ss/bblbtv_dns-backend" image: "karl0ss/bblbtv_dns-backend"
volumes:
- ./SQL/:/docker-entrypoint-initdb.d
ports: ports:
- "3001:3001" - "3001:3001"
environment: environment:
@ -13,17 +15,19 @@ services:
- DBUSER=root - DBUSER=root
- DBPASS=example - DBPASS=example
- DATABASE=BBLB_DNS - DATABASE=BBLB_DNS
frontend: depends_on:
build: - "db"
context: ./client # frontend:
dockerfile: .dockerfile # build:
image: "karl0ss/bblbtv_dns-frontend" # context: ./client
ports: # dockerfile: Dockerfile.prod
- "6969:6969" # image: "karl0ss/bblbtv_dns-frontend"
environment: # ports:
- PORT=6969 # - "6969:6969"
links: # environment:
- "backend" # - PORT=6969
# links:
# - "backend"
db: db:
image: mariadb image: mariadb
restart: always restart: always
@ -31,8 +35,6 @@ services:
MYSQL_ROOT_PASSWORD: example MYSQL_ROOT_PASSWORD: example
ports: ports:
- 3306:3306 - 3306:3306
links:
- "backend"
adminer: adminer:
image: adminer image: adminer
restart: always restart: always

View File

@ -1 +1 @@
[{"StreamName":"Insanity","StreamURL":"https://trippy.pro:443"},{"StreamName":"PremPlus","StreamURL":"https://itty.in:443"},{"StreamName":"GunSlinger","StreamURL":"http://gunslingertv.org:8080"},{"StreamName":"VIP","StreamURL":"http://shark.brokenwarrior.xyz:8080"},{"StreamName":"Technoid","StreamURL":"http://capoisagod2021.org:8080"},{"StreamName":"Old Premium","StreamURL":"https://caporeds.online:443"},{"StreamName":"??","StreamURL":"http://screamstreams.info:8080"},{"StreamName":"Gold","StreamURL":"http://catenamode.cf:8090"},{"StreamName":"??","StreamURL":"http://bigbox.me.uk:2086"},{"StreamName":"??","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"??","StreamURL":"http://mytv.digital:8080/"},{"StreamName":"??","StreamURL":"http://megav2.tk:2052"},{"StreamName":"??","StreamURL":"http://toastthehost.live:8080"},{"StreamName":"??","StreamURL":"http://ac.mustardsubs.tk:8880"},{"StreamName":"Gold","StreamURL":"http://ip365.cx:80"},{"StreamName":"??","StreamURL":"http://stream.streamhubtv.xyz:8080"},{"StreamName":"??","StreamURL":"http://foxmedia.bounceme.net:8282"},{"StreamName":"Foden","StreamURL":"http://bemo.one:8080"},{"StreamName":"Shark","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"Keano","StreamURL":"https://rushem.in:443"},{"StreamName":"??","StreamURL":"http://theonlinemedia.network:2052"},{"StreamName":"Python","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"??","StreamURL":"http://pimptv.dnsabr.com:8080"},{"StreamName":"??","StreamURL":"http://tavaratv.xyz:2095"},{"StreamName":"??","StreamURL":"http://cms-tan.media:8880"},{"StreamName":"??","StreamURL":"http://streamknighttv.xyz:8080"},{"StreamName":"??","StreamURL":"http://covidsucks.xyz:8080"},{"StreamName":"??","StreamURL":"http://fckbrexit.link:8080"},{"StreamName":"??","StreamURL":"http://tv.realot.xyz:35001"},{"StreamName":"??","StreamURL":"http://iptv.satplex.co.uk:8080"},{"StreamName":"Gambler","StreamURL":"http://sting.ltd:25461"},{"StreamName":"??","StreamURL":"http://ruby.dnsfor.me:8880"},{"StreamName":"??"},{"StreamName":"??"}] [{"StreamName":"Insanity","StreamURL":"https://trippy.pro:443"},{"StreamName":"PremPlus","StreamURL":"https://itty.in:443"},{"StreamName":"GunSlinger","StreamURL":"http://gunslingertv.org:8080"},{"StreamName":"VIP","StreamURL":"http://shark.brokenwarrior.xyz:8080"},{"StreamName":"Technoid","StreamURL":"http://capoisagod2021.org:8080"},{"StreamName":"Old Premium","StreamURL":"https://caporeds.online:443"},{"StreamName":"??","StreamURL":"http://screamstreams.info:8080"},{"StreamName":"Gold","StreamURL":"http://catenamode.cf:8090"},{"StreamName":"??","StreamURL":"http://bigbox.me.uk:2086"},{"StreamName":"??","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"??","StreamURL":"http://mytv.digital:8080/"},{"StreamName":"??","StreamURL":"http://megav2.tk:2052"},{"StreamName":"??","StreamURL":"http://toastthehost.live:8080"},{"StreamName":"??","StreamURL":"http://ac.mustardsubs.tk:8880"},{"StreamName":"Gold","StreamURL":"http://ip365.cx:80"},{"StreamName":"??","StreamURL":"http://stream.streamhubtv.xyz:8080"},{"StreamName":"??","StreamURL":"http://foxmedia.bounceme.net:8282"},{"StreamName":"Foden","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"Shark","StreamURL":"https://rushem.in:443"},{"StreamName":"Keano","StreamURL":"http://megav2.tk:2052"},{"StreamName":"??","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"Python"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"Gambler"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"}]

View File

@ -53,6 +53,6 @@ router.get('/', async function (req, res, next) {
res.send(fullStreamArray) res.send(fullStreamArray)
}); });
main() // main()
module.exports = router; module.exports = router;